bugGNU Octave - Bugs: bug #53909, localtime() does not access TZ on...

 
 

bug #53909: localtime() does not access TZ on windows

Submitted by:  Ian McCallion <ianmcc>
Submitted on:  Tue 15 May 2018 12:14:24 PM UTC  
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  4.4.0 Operating System:  Microsoft Windows

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 12:14:24 PM UTC, original submission:

This script should produce different values for t1, t2 and t3 because they should be representing the current time in three different timezones (unless you are already in CST of course):

The script works on unix versions of Octave, but at least on Octave Windows 4.2.2 and 4.4.0, after running this t1==t2==t3=

This next script however DOES produce correct values for t1, t2 and t3.

The reason this works and the first script didn't is probably a bug that the posix layer shipped with windows versions of Octave where tzset() is not called by localtime() and possible other timezone-dependent functions. If necessary (i.e. can't fix the posix layer) it should be fixed in Octave, by explicitly calling tzset wherever it may be needed.

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 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.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No changes have been made to this item

    Back to the top


    Powered by Savane 3.3