MSVCRT_localtime fix (was: Re: GetTimeZoneInformation return value fix)
Rein Klazes
rklazes at xs4all.nl
Wed Oct 27 04:43:24 CDT 2004
On Tue, 26 Oct 2004 15:43:45 -0700, you wrote:
> This breaks the msvcrt tests:
>
> ../../../tools/runtest -q -P wine -M msvcrt.dll -T ../../.. -p msvcrt_test.exe.so time.c && touch time.ok
> time.c:101: Test failed: Wrong date:Year 70 mon 0 yday 1 mday 2 wday 5 hour 0 min 0 sec 0 dst -1
> time.c:112: Test failed: Wrong date:Year 70 mon 0 yday 1 mday 2 wday 5 hour 0 min 0 sec 0 dst -1
This fixes it here.
Changelog:
dlls/msvcrt : time.c
In MSVCRT_localtime() return tm_isdst = 0 when there are no
daylight time changes in the local time zone.
Rein.
--
Rein Klazes
rklazes at xs4all.nl
-------------- next part --------------
--- wine/dlls/msvcrt/time.c 2004-10-26 08:25:33.000000000 +0200
+++ mywine/dlls/msvcrt/time.c 2004-10-27 11:11:06.000000000 +0200
@@ -124,11 +124,10 @@ struct MSVCRT_tm* MSVCRT_localtime(const
tzid = GetTimeZoneInformation(&tzinfo);
- if (tzid == TIME_ZONE_ID_UNKNOWN || tzid == TIME_ZONE_ID_INVALID) {
+ if (tzid == TIME_ZONE_ID_INVALID)
tm.tm_isdst = -1;
- } else {
+ else
tm.tm_isdst = (tzid == TIME_ZONE_ID_DAYLIGHT?1:0);
- }
return &tm;
}
More information about the wine-devel
mailing list