TImezones

  • Thread starter Thread starter Larry Waibel
  • Start date Start date
L

Larry Waibel

I have my device set for a UTC timezone. If I do a 'time' command I get, for
instance, an hour of 13. But when I look at events that are entered in the
event log, it stamps the hour as 6. Even if the 'time' command is adjusting
for local, if I'm in UTC timezone I was expecting that local and GMT would be
the same. What am I missing? Thanks!
 
Larry Waibel said:
I have my device set for a UTC timezone. If I do a 'time' command I
get, for
instance, an hour of 13. But when I look at events that are entered
in the
event log, it stamps the hour as 6. Even if the 'time' command is
adjusting
for local, if I'm in UTC timezone I was expecting that local and GMT
would be
the same. What am I missing? Thanks!

I've not seen this behavior before - all of the machines I've had
experience with show the same system and event log times regardless of
the time zone or daylight saving time status. As far as I know, Windows
treats the hardware clock as local time and doesn't do any adjusting.

I tried to look at the registry settings for the UTC time zone, but my
system doesn't have any time zones listed with UTC as a part of the name
so I'm not sure what settings you are using. If you could post the
values in the UTC time zone key under HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Time Zones and the contents of the
HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation key it may be
that something there will help figure out what is happening.

Regards,

Dave
 
From: "Dave R." <dwragle at drbsystems dot com>
Subject: Re: TImezones
Date: Thu, 6 Apr 2006 17:10:17 -0400
Newsgroups: microsoft.public.windowsxp.embedded



I've not seen this behavior before - all of the machines I've had
experience with show the same system and event log times regardless of
the time zone or daylight saving time status. As far as I know, Windows
treats the hardware clock as local time and doesn't do any adjusting.

I tried to look at the registry settings for the UTC time zone, but my
system doesn't have any time zones listed with UTC as a part of the name
so I'm not sure what settings you are using. If you could post the
values in the UTC time zone key under HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Time Zones and the contents of the
HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation key it may be
that something there will help figure out what is happening.

Regards,

Dave
Sorry, I kind of use GMT and UTC and Zulu interchangably; here's the contents
of the .reg file I imported into my component:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation]
"Bias"=dword:00000000
"StandardName"="GMT Standard Time"
"StandardBias"=dword:00000000
"StandardStart"=hex:00,00,0a,00,05,00,02,00,00,00,00,00,00,00,00,00
"DaylightName"="GMT Standard Time"
"DaylightBias"=dword:00000000
"DaylightStart"=hex:00,00,0a,00,05,00,02,00,00,00,00,00,00,00,00,00
"ActiveTimeBias"=dword:00000000
"DisableAutoDaylightTimeSet"=dword:00000001
 
Larry Waibel said:
Sorry, I kind of use GMT and UTC and Zulu interchangably;

No problem - that's what I suspected but I wasn't sure so I figured I'd
be safe & ask :)
here's the contents of the .reg file I imported into my component:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation]
"Bias"=dword:00000000
"StandardName"="GMT Standard Time"
"StandardBias"=dword:00000000
"StandardStart"=hex:00,00,0a,00,05,00,02,00,00,00,00,00,00,00,00,00
"DaylightName"="GMT Standard Time"
"DaylightBias"=dword:00000000
"DaylightStart"=hex:00,00,0a,00,05,00,02,00,00,00,00,00,00,00,00,00
"ActiveTimeBias"=dword:00000000
"DisableAutoDaylightTimeSet"=dword:00000001

Nothing here really looks like a problem. The only thing unusual I see
is that you've not only set the three bias values to zero and disabled
auto daylight time set, but have also set the start & end to be the same
date & time. I can't imagine that would cause a problem, but you never
know. It might be worth changing StandardStart to
00,00,0a,00,05,00,04,00,00,00,00,00,00,00,00,00 which would be 4am
instead of 2am on the same date as DaylightStart and see if that has an
effect.

Let me know how that goes. If that doesn't do it, I'm not sure where
else to look - hopefully one of the experts here will have an idea.

Regards,

Dave
 
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation]
"Bias"=dword:00000000
"StandardName"="GMT Standard Time"
"StandardBias"=dword:00000000
"StandardStart"=hex:00,00,0a,00,05,00,02,00,00,00,00,00,00,00,00,00
"DaylightName"="GMT Standard Time"
"DaylightBias"=dword:00000000
"DaylightStart"=hex:00,00,0a,00,05,00,02,00,00,00,00,00,00,00,00,00
"ActiveTimeBias"=dword:00000000
"DisableAutoDaylightTimeSet"=dword:00000001

Nothing here really looks like a problem. The only thing unusual I see
is that you've not only set the three bias values to zero and disabled
auto daylight time set, but have also set the start & end to be the same
date & time. I can't imagine that would cause a problem, but you never
know. It might be worth changing StandardStart to
00,00,0a,00,05,00,04,00,00,00,00,00,00,00,00,00 which would be 4am
instead of 2am on the same date as DaylightStart and see if that has an
effect.

Let me know how that goes. If that doesn't do it, I'm not sure where
else to look - hopefully one of the experts here will have an idea.

Regards,

Dave
Those are the values I got on a regular XP system by changing the time zone
to GMT and unchecking the daylight savings time box. Then I just exported
the registry branch and put it in a component. Just can't understand why the
time stamp that ReportEvent puts in the Windows Event Log is 7 hours earlier
than what I get from the 'time /t' command.
 
Nothing here really looks like a problem
You're right, it was my bad! My target device has the timezone set for GMT.
Because I'm trying to keep my footprint as small as possible I don't have
support on the target for event log viewing. Instead I use the resource kit
'dumpel' to view it from my development system. Of course that system has a
Pacific timezone. So it looks like 'dumpel' is seeing the GMT time in the
log relative to my development's timezone. Thanks for the help in getting me
to look at other reasons why I had the problem!
 
Larry Waibel said:
You're right, it was my bad! My target device has the timezone set
for GMT.
Because I'm trying to keep my footprint as small as possible I don't
have
support on the target for event log viewing. Instead I use the
resource kit
'dumpel' to view it from my development system. Of course that system
has a
Pacific timezone. So it looks like 'dumpel' is seeing the GMT time in
the
log relative to my development's timezone. Thanks for the help in
getting me
to look at other reasons why I had the problem!

I'm glad you were able to figure out what was happening. Sometimes you
just need someone to bounce things off of to be able to see what is
going on. I can't tell you how many times I've come up with a solution
to my own problem while talking about it with someone else (or something
else - I'm thinking about hiring out my pet dog as a consultant since
she's helped me with so many issues ;-) ).

Best Regards,

Dave
 
Back
Top