If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#16
|
|||
|
|||
Time Error
On Nov 4, 4:48*pm, RWW-MCW wrote:
On Nov 4, 2:41*pm, "Pegasus [MVP]" wrote: "Meanon" wrote in message ... On Nov 4, 10:26 am, RWW-MCW wrote: On Nov 2, 5:43 pm, Meanon wrote: Since the time change on Sunday my WinXP Pro computer shows the right time in the Windows clock (in the system tray), but programs that use a function call to get the time from the operating system are 1 hour ahead. I recall something similar happened the last time the clocks changed. Does anyone know of a fix for this? We're seeing a problem in the WMI Win32_OperatingSystem class. The LocalDateTime is reporting an hour ahead. Anything that uses this value is an hour off. (We first noticed it when our SCCM-based WakeOnLAN started waking computers up an hour early.) Thanks, looks like I'm not going crazy after all! Now I just have to find a fix/patch to fix it. ============ If the class mentioned by RWW is behind this phenomenon then you should be able to reproduce it with the .vbs code below. Note that it reports your current time zone. If that number is incorrect then you will get incorrect results. You can probably check this with Microsoft's TimeZone tool:http://www.microsoft.com/downloads/t...Id=07fb0bd8-f3.... Set objWMIService = GetObject("winmgmts:\\.\root\CIMV2") Set colItems = objWMIService.ExecQuery( _ * *"SELECT * FROM Win32_OperatingSystem",,48) For Each objItem In colItems * *WScript.Echo "CurrentTimeZone: " & objItem.CurrentTimeZone * *dtmLocalTime = objItem.LocalDateTime * *dtmMonth = Mid(dtmLocalTime, 5, 2) * *dtmDay = Mid(dtmLocalTime, 7, 2) * *dtmYear = Left(dtmLocalTime, 4) * *dtmHour = Mid(dtmLocalTime, 9, 2) * *dtmMinutes = Mid(dtmLocalTime, 11, 2) * *dtmSeconds = Mid(dtmLocalTime, 13, 2) * *MsgBox "Time Zone=" & objItem.CurrentTimeZone & Chr(10) _ * *& "Date=" & dtmMonth & "/" & dtmDay & "/" & dtmYear & Chr(10) _ * *& "Time=" & dtmHour & ":" & dtmMinutes & ":" & dtmSeconds Next I should have included more detail on this. *The weird part is that the timezone and DST values are correct, in both Win32_TimeZone and in Win32_OperatingSystem, but the LocalDateTime is an hour off. *The time shows up correctly in the Windows GUI, but the LocalDateTime value doesn't match. *Also, the time values in Win32_LocalTime are correct, but the LocalDateTime value in Win32_OperatingSystem doesn't match. Very strange. More details. The value that displays in in LocalDateTime (viewed with WMI CIM Studio) includes "...GMT-04:00". We're in the US Eastern Time Zone and just went from Daylight to Standard time. So, the LocalDateTime value should include "...GMT-05:00". Everywhere everywhere else I look has the 5-hour offset. I'm seeing this on both Windows XP SP3 and Vista SP2. For what it's worth, the closest thing I've found that's similar to my issue (thought not exactly) after extensive searching is this report from back in March: http://connect.microsoft.com/VisualS...dbackID=422388 |
Ads |
#17
|
|||
|
|||
Time Error
On Nov 4, 2:06*pm, RWW-MCW wrote:
On Nov 4, 4:48*pm, RWW-MCW wrote: On Nov 4, 2:41*pm, "Pegasus [MVP]" wrote: "Meanon" wrote in message .... On Nov 4, 10:26 am, RWW-MCW wrote: On Nov 2, 5:43 pm, Meanon wrote: Since the time change on Sunday my WinXP Pro computer shows the right time in the Windows clock (in the system tray), but programs that use a function call to get the time from the operating system are 1 hour ahead. I recall something similar happened the last time the clocks changed. Does anyone know of a fix for this? We're seeing a problem in the WMI Win32_OperatingSystem class. The LocalDateTime is reporting an hour ahead. Anything that uses this value is an hour off. (We first noticed it when our SCCM-based WakeOnLAN started waking computers up an hour early.) Thanks, looks like I'm not going crazy after all! Now I just have to find a fix/patch to fix it. ============ If the class mentioned by RWW is behind this phenomenon then you should be able to reproduce it with the .vbs code below. Note that it reports your current time zone. If that number is incorrect then you will get incorrect results. You can probably check this with Microsoft's TimeZone tool:http://www.microsoft.com/downloads/t...Id=07fb0bd8-f3.... Set objWMIService = GetObject("winmgmts:\\.\root\CIMV2") Set colItems = objWMIService.ExecQuery( _ * *"SELECT * FROM Win32_OperatingSystem",,48) For Each objItem In colItems * *WScript.Echo "CurrentTimeZone: " & objItem.CurrentTimeZone * *dtmLocalTime = objItem.LocalDateTime * *dtmMonth = Mid(dtmLocalTime, 5, 2) * *dtmDay = Mid(dtmLocalTime, 7, 2) * *dtmYear = Left(dtmLocalTime, 4) * *dtmHour = Mid(dtmLocalTime, 9, 2) * *dtmMinutes = Mid(dtmLocalTime, 11, 2) * *dtmSeconds = Mid(dtmLocalTime, 13, 2) * *MsgBox "Time Zone=" & objItem.CurrentTimeZone & Chr(10) _ * *& "Date=" & dtmMonth & "/" & dtmDay & "/" & dtmYear & Chr(10) _ * *& "Time=" & dtmHour & ":" & dtmMinutes & ":" & dtmSeconds Next I should have included more detail on this. *The weird part is that the timezone and DST values are correct, in both Win32_TimeZone and in Win32_OperatingSystem, but the LocalDateTime is an hour off. *The time shows up correctly in the Windows GUI, but the LocalDateTime value doesn't match. *Also, the time values in Win32_LocalTime are correct, but the LocalDateTime value in Win32_OperatingSystem doesn't match. Very strange. More details. *The value that displays in in LocalDateTime (viewed with WMI CIM Studio) includes "...GMT-04:00". *We're in the US Eastern Time Zone and just went from Daylight to Standard time. *So, the LocalDateTime value should include "...GMT-05:00". *Everywhere everywhere else I look has the 5-hour offset. *I'm seeing this on both Windows XP SP3 and Vista SP2. For what it's worth, the closest thing I've found that's similar to my issue (thought not exactly) after extensive searching is this report from back in March:http://connect.microsoft.com/VisualS...back.aspx?...- Hide quoted text - - Show quoted text - One more data point: I'm also seeing the same results in Windows 7. |
#18
|
|||
|
|||
Time Error
Did you visit http://support.microsoft.com/gp/cp_dst ???
"Meanon" wrote in message ... On Nov 4, 2:06 pm, RWW-MCW wrote: On Nov 4, 4:48 pm, RWW-MCW wrote: On Nov 4, 2:41 pm, "Pegasus [MVP]" wrote: "Meanon" wrote in message ... On Nov 4, 10:26 am, RWW-MCW wrote: On Nov 2, 5:43 pm, Meanon wrote: Since the time change on Sunday my WinXP Pro computer shows the right time in the Windows clock (in the system tray), but programs that use a function call to get the time from the operating system are 1 hour ahead. I recall something similar happened the last time the clocks changed. Does anyone know of a fix for this? We're seeing a problem in the WMI Win32_OperatingSystem class. The LocalDateTime is reporting an hour ahead. Anything that uses this value is an hour off. (We first noticed it when our SCCM-based WakeOnLAN started waking computers up an hour early.) Thanks, looks like I'm not going crazy after all! Now I just have to find a fix/patch to fix it. ============ If the class mentioned by RWW is behind this phenomenon then you should be able to reproduce it with the .vbs code below. Note that it reports your current time zone. If that number is incorrect then you will get incorrect results. You can probably check this with Microsoft's TimeZone tool:http://www.microsoft.com/downloads/t...Id=07fb0bd8-f3.... Set objWMIService = GetObject("winmgmts:\\.\root\CIMV2") Set colItems = objWMIService.ExecQuery( _ "SELECT * FROM Win32_OperatingSystem",,48) For Each objItem In colItems WScript.Echo "CurrentTimeZone: " & objItem.CurrentTimeZone dtmLocalTime = objItem.LocalDateTime dtmMonth = Mid(dtmLocalTime, 5, 2) dtmDay = Mid(dtmLocalTime, 7, 2) dtmYear = Left(dtmLocalTime, 4) dtmHour = Mid(dtmLocalTime, 9, 2) dtmMinutes = Mid(dtmLocalTime, 11, 2) dtmSeconds = Mid(dtmLocalTime, 13, 2) MsgBox "Time Zone=" & objItem.CurrentTimeZone & Chr(10) _ & "Date=" & dtmMonth & "/" & dtmDay & "/" & dtmYear & Chr(10) _ & "Time=" & dtmHour & ":" & dtmMinutes & ":" & dtmSeconds Next I should have included more detail on this. The weird part is that the timezone and DST values are correct, in both Win32_TimeZone and in Win32_OperatingSystem, but the LocalDateTime is an hour off. The time shows up correctly in the Windows GUI, but the LocalDateTime value doesn't match. Also, the time values in Win32_LocalTime are correct, but the LocalDateTime value in Win32_OperatingSystem doesn't match. Very strange. More details. The value that displays in in LocalDateTime (viewed with WMI CIM Studio) includes "...GMT-04:00". We're in the US Eastern Time Zone and just went from Daylight to Standard time. So, the LocalDateTime value should include "...GMT-05:00". Everywhere everywhere else I look has the 5-hour offset. I'm seeing this on both Windows XP SP3 and Vista SP2. For what it's worth, the closest thing I've found that's similar to my issue (thought not exactly) after extensive searching is this report from back in March:http://connect.microsoft.com/VisualS...back.aspx?...- Hide quoted text - - Show quoted text - One more data point: I'm also seeing the same results in Windows 7. |
#19
|
|||
|
|||
Time Error
On Nov 5, 10:29*am, "Unknown" wrote:
Did you visit *http://support.microsoft.com/gp/cp_dst*??? "Meanon" wrote in message ... On Nov 4, 2:06 pm, RWW-MCW wrote: On Nov 4, 4:48 pm, RWW-MCW wrote: On Nov 4, 2:41 pm, "Pegasus [MVP]" wrote: "Meanon" wrote in message .... On Nov 4, 10:26 am, RWW-MCW wrote: On Nov 2, 5:43 pm, Meanon wrote: Since the time change on Sunday my WinXP Pro computer shows the right time in the Windows clock (in the system tray), but programs that use a function call to get the time from the operating system are 1 hour ahead. I recall something similar happened the last time the clocks changed. Does anyone know of a fix for this? We're seeing a problem in the WMI Win32_OperatingSystem class. The LocalDateTime is reporting an hour ahead. Anything that uses this value is an hour off. (We first noticed it when our SCCM-based WakeOnLAN started waking computers up an hour early.) Thanks, looks like I'm not going crazy after all! Now I just have to find a fix/patch to fix it. ============ If the class mentioned by RWW is behind this phenomenon then you should be able to reproduce it with the .vbs code below. Note that it reports your current time zone. If that number is incorrect then you will get incorrect results. You can probably check this with Microsoft's TimeZone tool:http://www.microsoft.com/downloads/t...Id=07fb0bd8-f3.... Set objWMIService = GetObject("winmgmts:\\.\root\CIMV2") Set colItems = objWMIService.ExecQuery( _ "SELECT * FROM Win32_OperatingSystem",,48) For Each objItem In colItems WScript.Echo "CurrentTimeZone: " & objItem.CurrentTimeZone dtmLocalTime = objItem.LocalDateTime dtmMonth = Mid(dtmLocalTime, 5, 2) dtmDay = Mid(dtmLocalTime, 7, 2) dtmYear = Left(dtmLocalTime, 4) dtmHour = Mid(dtmLocalTime, 9, 2) dtmMinutes = Mid(dtmLocalTime, 11, 2) dtmSeconds = Mid(dtmLocalTime, 13, 2) MsgBox "Time Zone=" & objItem.CurrentTimeZone & Chr(10) _ & "Date=" & dtmMonth & "/" & dtmDay & "/" & dtmYear & Chr(10) _ & "Time=" & dtmHour & ":" & dtmMinutes & ":" & dtmSeconds Next I should have included more detail on this. The weird part is that the timezone and DST values are correct, in both Win32_TimeZone and in Win32_OperatingSystem, but the LocalDateTime is an hour off. The time shows up correctly in the Windows GUI, but the LocalDateTime value doesn't match. Also, the time values in Win32_LocalTime are correct, but the LocalDateTime value in Win32_OperatingSystem doesn't match. Very strange. More details. The value that displays in in LocalDateTime (viewed with WMI CIM Studio) includes "...GMT-04:00". We're in the US Eastern Time Zone and just went from Daylight to Standard time. So, the LocalDateTime value should include "...GMT-05:00". Everywhere everywhere else I look has the 5-hour offset. I'm seeing this on both Windows XP SP3 and Vista SP2. For what it's worth, the closest thing I've found that's similar to my issue (thought not exactly) after extensive searching is this report from back in March:http://connect.microsoft.com/VisualS...Feedback.aspx?... Hide quoted text - - Show quoted text - One more data point: *I'm also seeing the same results in Windows 7.- Hide quoted text - - Show quoted text - Yes, but it doesn't address the proble. See RWW-MCW's reply above for an explanation of the problem. |
#20
|
|||
|
|||
Time Error
I have tested this on my home computer and my wife's work computer.
The LocalDateTime is wrong on all of them. This must be a bug. Before posting a reply suggesting we check our DST settings or read more literature, please look at the LocalDateTime or run the script in my previous post on your PC(s). NOTE: To run the above script on Windows XP, you must remove or remark out the line with "OSArchitecture" near the beginning. I only included that kind of info for context. Last, I've also started a thread on the two MS Technet forums below. Windows XP SP3 http://social.technet.microsoft.com/...4-a79a90b68528 Vista Applications http://social.technet.microsoft.com/...8-66cff2827314 |
#21
|
|||
|
|||
Time Error
I am shifting my focus to the MS Technet Windows XP SP3 forum thread
shown above. I have posted additional details/evidence there. This will be my last post on this thread until I get an answer. |
|
Thread Tools | |
Display Modes | |
|
|