vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| On Thu, 01 May 2008 16:53:18 +0000, Matt Hayes wrote: > hwclock --systohc > > will sync your hardware clock to the system clock > my HW clock is set to UTC; if i set correctly my sys clock, will 'hwclock --systohc' set the HW clock taking into account the delay due to timezone? or will it just copy the sys clock to HW one? anyway, first i need to solve to problem of DST; my sys hasn't moved to DST whuile the HW clock is set to UTC. > -Matt |
| ||||
| heavytull <heavytull@hotmail.com> wrote: >> hwclock --systohc >> >> will sync your hardware clock to the system clock >> > my HW clock is set to UTC; if i set correctly my sys clock, will 'hwclock > --systohc' set the HW clock taking into account the delay due to timezone? Add an extra "-u" (clock already in UTC) to the hwclock commandline given above. > or will it just copy the sys clock to HW one? Without the -u it will convert UTC "system clock" to localtime and put THAT into the hardware clock, with the -u it knows that both system clock and hardware clock are in UTC, so no conversions needed. See also the hwclock entries in /etc/rc.d/rc.S (for reading the hwclock at bootup) and /etc/rc.d/rc.6 (for rewriting it from the system clock at shutdown). Although they nowadays use the "long form" of the option (--utc). > anyway, first i need to solve to problem of DST; > my sys hasn't moved to DST whuile the HW clock is set to UTC. Neither the hardware clock nor system time SHOULD move, just your local representation (localtime) OF it. For instance, when I do "date" in the winter, I could get Sun Mar 8 15:36:51 CET 2008 but today I get Sun May 11 16:36:51 CEST 2008 (note the extra S in the timezone designation). On the other hand "date -u" will tell me Sun May 11 14:36:51 UTC 2008 so my "system time" is at 14:36, while my LOCAL time is 2 hours later (CET, Central European Timezone, is 1 hour "east" of GMT, with an extra hour because of the DST). -- ************************************************** ****************** ** Eef Hartman, Delft University of Technology, dept. EWI/TW ** ** e-mail: E.J.M.Hartman@math.tudelft.nl, fax: +31-15-278 7295 ** ** snail-mail: P.O. Box 5031, 2600 GA Delft, The Netherlands ** ************************************************** ****************** |