bugGNU Octave - Bugs: bug #53908, Omissions in Documentation of...

 
 

bug #53908: Omissions in Documentation of tm_struct

Submitted by:  Ian McCallion <ianmcc>
Submitted on:  Tue 15 May 2018 11:50:00 AM UTC  
 
Category:  Documentation Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Documentation
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  4.4.0 Operating System:  Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 15 May 2018 07:21:57 PM UTC, comment #3:

I think someone with access to Windows will have to try to get something working with GetTimeZoneInformation, GetDynamicTimeZoneInformation, and/or GetTimeZoneInformationForYear. The latter two are not available in older versions of Windows.

I guess this might look something like

but that's just off the top of my head without ever having used these functions before.

Mike Miller <mtmiller>
Project Administrator
Tue 15 May 2018 06:21:01 PM UTC, comment #2:

Looking on MSDN, the aptly named GetTimeZoneInformation function seems to fit the bill.
https://msdn.microsoft.com/en-us/library/windows/desktop/ms724421(v=vs.85).aspx

Ian McCallion <ianmcc>
Tue 15 May 2018 05:43:02 PM UTC, comment #1:

The value of gmtoff is meant to be the number of seconds offset between your local time and UTC, so in your case it ought to be 3600.

I think we would be happy to add support to fill in this offset if it is at all possible with the Windows API. If there is a way to get that information for a given time value, it can be added. Otherwise we should document that it is not implemented on some systems.

Mike Miller <mtmiller>
Project Administrator
Tue 15 May 2018 11:50:00 AM UTC, original submission:

A. I'm in the UK and on Windows (4.2.2 and 4.4.0):

> >> localtime(time)
> usec = 178342
> sec = 59
> min = 32
> hour = 8
> mday = 12
> mon = 4
> year = 118
> wday = 6
> yday = 131
> isdst = 1
> gmtoff = 0
> zone = GMT Daylight Time

Clearly gmtoff should be 1 as it is currently daylight time.

I would suggest this is a code bug. However I have been asked to submit it as a documentation bug with the fix being to state at the start of section 36.1 of the manual that gmtoff is not implemented in Windows.

B. The mktime function takes a tm_struct as parameter. However the values for gmtoff and zone are ignored. This is working as designed (because mktime uses the TZ environment variable to obtain timezone information). This fact should be mentioned in the documentation.

Ian McCallion <ianmcc>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by ianmcc (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    No changes have been made to this item

    Back to the top


    Powered by Savane 3.3