EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: epicsTime_localtime() currently reports daylight saving time incorrectly on Windows
From: <[email protected]>
To: <[email protected]>, <[email protected]>
Date: Tue, 20 Oct 2015 11:06:31 +0000
Hi Michael,

All tests now pass OK
Thank you

Regards,

Freddie

-----Original Message-----
From: Michael Davidsaver [mailto:[email protected]] 
Sent: 19 October 2015 17:43
To: Akeroyd, Freddie (STFC,RAL,ISIS); [email protected]
Subject: Re: epicsTime_localtime() currently reports daylight saving time incorrectly on Windows

> ... should be honoured by the built-in localtime() function

I've make a quick attempt to do this which passes w/ mingw+wine.  Please pull and retest.


On 10/19/2015 12:17 PM, [email protected] wrote:
> Hi Michael,
> 
> test results enclosed for running on windows-x64, _tzset() is indeed 
> ignored by epicsTime_localtime() (or rather by 
> GetTimeZoneInformation()) but should be honoured by the built-in 
> localtime() function
> 
> Regards,
> 
> Freddie
> 
>> -----Original Message-----
>> From: Michael Davidsaver [mailto:[email protected]]
>> Sent: 19 October 2015 14:59
>> To: Akeroyd, Freddie (STFC,RAL,ISIS); [email protected]
>> Subject: Re: epicsTime_localtime() currently reports daylight saving 
>> time incorrectly on Windows
>>
>> I've tried to create a test case for this.  Please run 
>> epicsTimeZoneTest in src/libCom/test and report the results.
>>
>> git clone --branch tztest 
>> https://github.com/mdavidsaver/epics-base.git
>> cd epics-base
>> make -C src libCom/test
>> ./src/libCom/test/O.*/epicsTimeZoneTest.exe
>>
>> I've already found that _tzset() with WINE 1.6.2 doesn't seem to have 
>> any effect, so the tests fail.
>>
>> On 10/19/2015 07:10 AM, [email protected] wrote:
>>> Hi,
>>>
>>> I've noticed that the "tm_isdst" member of the "struct tm" returned 
>>> by the
>> Win32 implementation of epicsTime_localtime() is not currently 
>> reporting DST status correctly. The problem is that though the 
>> StandardDate / DaylightDate members of TIME_ZONE_INFORMATION are 
>> SYSTEMTIME structures, they have slightly different interpretations of their contents than
>> usual in particular   wDay == 5  means "last occurrence of wDayOfWeek in
>> the month" rather than "5th day of month". One solution would be to 
>> use the status returned by GetTimeZoneInformation() which now seems 
>> to include the DST status, but I think the epicsTime_localtime() 
>> implementation could actually be replace by something simpler like 
>> (give or take a NULL pointer
>> check):
>>>
>>> 	    memcpy(pTM, localtime(pAnsiTime), sizeof(struct tm));
>>>
>>> as on WIN32 the localtime() function uses thread local storage 
>>> rather than
>> global static storage (though the same TLS is shared with gmtime() )
>>>
>>> Regards,
>>>
>>> Freddie
>>>
>>>


References:
epicsTime_localtime() currently reports daylight saving time incorrectly on Windows freddie.akeroyd
Re: epicsTime_localtime() currently reports daylight saving time incorrectly on Windows Michael Davidsaver
RE: epicsTime_localtime() currently reports daylight saving time incorrectly on Windows freddie.akeroyd
Re: epicsTime_localtime() currently reports daylight saving time incorrectly on Windows Michael Davidsaver

Navigate by Date:
Prev: EPICS delaygen module moves to GitHub Pete Jemian
Next: Looking at ethercat and EPICS Williams Jr., Ernest L.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: epicsTime_localtime() currently reports daylight saving time incorrectly on Windows Michael Davidsaver
Next: asyn timeout Pedro Gigoux
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 16 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·