Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - /sbin/rtc -l hw is off by an hour: (5 Items)
   
/sbin/rtc -l hw is off by an hour  
In QNX 6.5.0 /sbin/rtc -l hw sets the clock an hour ahead.
/sbin/rtc July 9 2010

I know, why on earth would I do that? I'm running in a VM (so maybe it's VMware that's causing the problem??)

Has anyone else seen this?
RE: /sbin/rtc -l hw is off by an hour  
Does your timezone account for the summer time?

> -----Message d'origine-----
> De : Norton Allen [mailto:community-noreply@qnx.com]
> Envoyé : 18 novembre 2011 15:53
> À : momentics-community
> Objet : /sbin/rtc -l hw is off by an hour
> 
> In QNX 6.5.0 /sbin/rtc -l hw sets the clock an hour ahead.
> /sbin/rtc July 9 2010
> 
> I know, why on earth would I do that? I'm running in a VM (so maybe it's
> VMware that's causing the problem??)
> 
> Has anyone else seen this?
> 
> 
> 
> _______________________________________________
> 
> QNX Momentics Community Support
> http://community.qnx.com/sf/go/post90194
> 
Re: RE: /sbin/rtc -l hw is off by an hour  
My timezone is EST05EDT04,..., so yes, it takes summer time into account. We are on standard time now, which means you 
have to add 5 hours to local time to get UTC. During daylight time, you'd have to add 4 hours to local time to get UTC. 
What's apparently happening is 6 hours are being added to local time, which isn't right in either case.

This could be explained if the realtime clock were set off by an hour by the host operating system or VMware's emulation
. I just tried:

export TZ=utc00
/sbin/rtc hw
date

and see that it is still showing an hour ahead, so it appears that the host OS (XP) is somehow setting the rtc an hour 
ahead, or the VMware layer is doing that.
Re: RE: /sbin/rtc -l hw is off by an hour  
That is to say, it appears the rtc is set the local time in the summer timezone. What makes this particularly odd is 
that I documented precisely the opposite behavior during the summer, when it appeared the clock was set to the local 
standard time.
Re: RE: /sbin/rtc -l hw is off by an hour  
Ugh. Sometimes you have to ask a question before you can figure out the answer. I've been thinking about this like the 
old dual-boot systems, but VMware virtualizes the whole damn machine, including the rtc, so the guest OS can have its 
set to a different time (i.e. the wrong time.)