Click to See Complete Forum and Search --> : how to stop Daylight savings time update


nephish
11-05-2007, 09:38 AM
Hey there all,

how would i go about stopping my ubuntu box from automatic update (moving the clock an hour forward and back ) on Daylight Saving Time events ?

i want to do this all manually

thanks

bwkaz
11-05-2007, 10:43 AM
Well, since it doesn't actually move the clock (it just uses a different offset between the kernel's time, which is in UTC, and the time it shows you, depending on what day and year it is), it's a little hard.

What you'd probably have to do is define a time zone that's X hours from UTC, around the entire year. Then you'd have to compile that timezone file, put it under /usr/share/zoneinfo somewhere, and set the $TZ environment variable to the path (relative to /usr/share/zoneinfo) to the file. Also copy the file to /etc/localtime (but be sure to remove the localtime symlink first, if it is a symlink). That will set the user-visible time to be X hours off from UTC all the time.

Now comes the harder part -- now you have to manually set a different timezone offset when you do want to start and stop DST. That'll require a second timezone definition, and you'll have to switch time zones again when you do want to change over (resetting $TZ, re-copying /etc/localtime), since you can't change the UTC time.

Why do you think you need to do this all manually, again?

nephish
11-05-2007, 10:50 AM
Dear God.

the reason we need to do this manually, is that we are running a system that gets machine reports from industrial sensors all the time, if some of them come in out of order, it creates a lot of messy data that, so far, has to be cleaned up by hand.

I did not know that this much went into this. Aren't there some time zones that do not play along with daylight savings time? and one of those could be selected, right?
Does every time zone get the update? I would think that right? then i would not matter if i use local or UTC..

please correct me if i am wrong.

thanks for your time, too.

happybunny
11-05-2007, 03:09 PM
can't you set to GMT which doesn't ever change?

You'll just have to offset your mind to realize that log entries at 12am GMT are really 8pm the night before

nephish
11-05-2007, 03:40 PM
yes, what i wound up doing is almost exactly that.
select another location in the same time zone that does not observe DST.

thanks