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
>
>
- Replies:
- RE: epicsTime_localtime() currently reports daylight saving time incorrectly on Windows freddie.akeroyd
- References:
- epicsTime_localtime() currently reports daylight saving time incorrectly on Windows freddie.akeroyd
- Navigate by Date:
- Prev:
epicsTime_localtime() currently reports daylight saving time incorrectly on Windows freddie.akeroyd
- 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
<2015>
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
epicsTime_localtime() currently reports daylight saving time incorrectly on Windows freddie.akeroyd
- Next:
RE: epicsTime_localtime() currently reports daylight saving time incorrectly on Windows freddie.akeroyd
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
<2015>
2016
2017
2018
2019
2020
2021
2022
2023
2024
|