Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Daylight Savings Using GMT/UTC

64 views
Skip to first unread message

Tim Houle

unread,
Jul 13, 2004, 10:38:07 AM7/13/04
to
I'm using Universal Time then calculating local time
daylight savings/standard based on info from
GetTimeZoneInformation() API. The problem is, When I
disable the "Automatically adjust clock for Daylight
Savings" option, the function call does not set the
daylight or standard bias parameters - They are always 0.
Anyone using this function call? I noticed the return
parameter is correct but the daylight and standard bias
should be -60 in daylight savings but it's 0. Anyone
experience this?

Thanks for any help.

Slobodan Brcin (eMVP)

unread,
Jul 13, 2004, 11:27:43 AM7/13/04
to
Hi Tim,

I'm using similar approach and it is working perfectly.
You are using functions like SystemTimeToTzSpecificLocalTime for conversion, right?

The thing is that your image must have disabled daylight saving and should probably use default time zone GMT +0 hours.
Now you should obtain tables on XP system with enabled time saving and time zone with GetTimeZoneInformation.
And use that values on your XPe image.

Working on this little more you can make your config program that will have valid table for all zones if you want and provide you
with option to choose.

But most importantly you can't (should not use since it will give you no useful information) use GetTimeZoneInformation on XPe
image.

Best regards,
Slobodan

"Tim Houle" <anon...@discussions.microsoft.com> wrote in message news:2bc4e01c468e7$038071e0$a501...@phx.gbl...

Tim Houle

unread,
Jul 13, 2004, 11:55:51 AM7/13/04
to
Slobodan,

SystemTimeToTzSpecificLocalTime is working great for
conversion but we allow administrators to change the time
zone using the xp date and time UI. Are you saying to
create my own data structures that contain the info about
time saving and use in my code?

>.
>

Slobodan Brcin (eMVP)

unread,
Jul 13, 2004, 12:02:20 PM7/13/04
to
Hi Tim,

> Are you saying to
> create my own data structures that contain the info about
> time saving and use in my code?


Yes this is exactly what I'm saying.
Also it will allow you to store data on unprotected partition so you won't have to worry about any of EWF and time related problems.

Best regards,]
Slobodan

"Tim Houle" <anon...@discussions.microsoft.com> wrote in message news:2bd7801c468f1$df0ffaf0$a501...@phx.gbl...

Tim Houle

unread,
Jul 13, 2004, 12:09:56 PM7/13/04
to
Great. Thanks for the help.

Tim

>.
>

0 new messages