"date" command and timezones
I have a simple question that is quite general for all Linux systems.
If I try to set a date within the daylight saving period, "date" treats my input as an UTC date so it automatically adds one hour to my date: (I want to enter this date: Mar 30 12:13 2007) # date -s 033012132007 Fri Mar 30 13:13:00 CETDST 2007 ("date" adds one hour to my date) # date Fri Mar 30 13:13:05 CETDST 2007 How can I tell the system that my date is localtime and not UTC? the "date" man page says that the time zone can be entered in [+FORMAT]. Any example of this? Is there any way of doing this without entering the local timezone? Thanks, Daniel. |
Can't you just use the time configurations on the top right of your screen in ubuntu? P.S. what Linux are u using exactly, that might help, even if i don't have an answer, haha i'm new to it all. MJ
|
Quote:
The time config is done on a remote server from an Internet browser. Daniel. |
specify time in UTC
date --utc MMDDhhmmCCYY.ss
take your local wallclock time, shift it to UTC. Then set the date on the remote system tell it "here's the time in UTC right now". If it knows it's own timezone it'll do the rest. also check hwclock(1) since you probably want to jump the hardware clock so when you reboot you're not way off again. -c |
Quote:
Thanks all! Daniel. |
Lads, use 'ntpdate' instead.
|
All times are GMT -5. The time now is 04:07 AM. |