How (not) to set the time and date :)

How to do things, solutions, recipes, tutorials
Message
Author
User avatar
Béèm
Posts: 513
Joined: Sun 16 Apr 2006, 16:18
Location: Brussels

Re: rdate and 'Set Clock from the Internet' problem workarou

#21 Post by Béèm »

Dyno Spoid wrote:----- -----

NOTE: rdate may not take Daylight Savings Time into consideration, so you may need to adjust your timezone by adding one hour during DST:
/Menu/Control Panel/Set timezone
Example: Central Time = GMT-6, choose GMT-5 during DST
- You will probably have to reboot for this to fully take effect.
- This should set the correct time in BIOS if you were previously having DST problems.
- This may affect other operating systems that take DST into account. Some operating systems (including some Linux configurations) require the BIOS clock to be at GMT, or at your timezone without accounting for DST, so there is no problem with timestamps during the change to/from DST. I haven't had any problems, but your milage may vary. I can say that Microsoft Windows has problems with timestamps on MS Windows file servers when 'Automatically adjust clock for DST' is not set on the workstation. :roll:
I don't have /menu/Control Panel/Set timezone.
I can do /menu/control center/system administration/set date&time but I have only UTC and the indication current local timezone :UTC (PUP)

However in another Linux distribution, PCLinuxOS, I can set the timezone to GMT+2
Also in Puppy JWM I can set the zimezon at GMT+2.
Puppy Linux 2.02 SMkey, KDE354mini, wine0.9.20, devx-qt-renamed.
Puppy Linux 2.10r1 SMkey, JWM, devx_qt_renamed_210, KDE355mini

User avatar
Dyno Spoid
Posts: 37
Joined: Tue 05 Sep 2006, 14:39
Location: Milwaukee, Wisconsin, U.S.A.
Contact:

rdate and 'Set Clock from the Internet' problem workaround

#22 Post by Dyno Spoid »

I updated my above post to include links to local second-tier time time servers, and to get time updates every 4 hours instead of every hour, which is more inline for home users. I run a fair-sized network, and timestamps are critical, so I still update the time every hour on one machine, the primary server. That server also runs a local time server, so all other machines look to it to update their clocks (also noted above). This keeps everyone in sync rather well.

As a note, Greenwich Mean Time (GMT) is now called Coordinated Universal Time (UTC).

The problem with Daylight Savings Time is actually not with rdate, but with Puppy Linux. rdate (on Puppy 2.02) does not take Daylight Savings Time into consideration if you're not using a Time Zone with DST enabled, so you may need to adjust your timezone by changing the timezone to a DST timezone.

Example: Central Standard Time is CST, Central Standard Daylight Savings Time is CDT (or CSST, depending on who named the timezone file).

Problem: Puppy doesn't work this way! Puppy doesn't use 'standard' time zone definitions.

Solution: Add one hour during DST, as stated in my previous post (using Xvesa). If this doesn't work you can edit /etc/TZ and set PUPx to the correct value. You'll need to reboot for everything to work properly.

Examples:
UTC-6 is PUP6, and with DST is PUP5
UTC-5 is PUP5, and with DST is PUP4
UTC+5 is PUP-5, and with DST is PUP-6
UTC+6 is PUP-6, and with DST is PUP-7

Notice the numbers in this example are in reverse of what you would normally expect (Puppy Linux version 2.02).

In Beem's case, the correct UTC is PUP-1, and with DST is PUP-2. /etc/TZ would therefore contain one line: PUP-2

8)
Last edited by Dyno Spoid on Tue 05 Sep 2006, 20:52, edited 1 time in total.

Auda
Posts: 131
Joined: Sun 08 May 2005, 20:08
Location: New Zealand ( Christchurchish )

#23 Post by Auda »

As a note, Greenwich Mean Time (GMT) is now called Universal Time (UTC).
Close but no cigar.
GMT is based on the rotation of the earth so that when the sun is overhead ( ie. midday ) the time is called 12:00.
UTC is based on the vibrations of an atom in an atomic clock and has to be adjusted all the time to keep it in line with the real world.
Since about 1970 ? around 1/2 a minute has had to been added to UTC to keep it in line.
So why do we use UTC rather than GMT ? Because its more accurate !
As a side note its interesting that we have gone from imperical forms of mesurement, feet, stones, gallons, GMT, gold and silver for money, to arbatory forms, metre, gram, litre, UTC, paper/electronic money, which have no relationship to normal every day life.

Auda

Auda
Posts: 131
Joined: Sun 08 May 2005, 20:08
Location: New Zealand ( Christchurchish )

#24 Post by Auda »

Deleted duplicate of above
Last edited by Auda on Tue 05 Sep 2006, 20:52, edited 1 time in total.

User avatar
Dyno Spoid
Posts: 37
Joined: Tue 05 Sep 2006, 14:39
Location: Milwaukee, Wisconsin, U.S.A.
Contact:

UTC

#25 Post by Dyno Spoid »

While that's somewhat off topic, it did prompt some information searching. http://en.wikipedia.org/wiki/UTC

The chart at the bottom shows my timezone (Central Standard Time (USA CST) is no longer GMT-6, but rather UTC-6, and I now have Central Daylight Time of UTC-5 instead of CDT (Central Daylight Time) or CSST (Central Standard daylight Savings Time). This suggests my workaround for Puppy Linux is actually the new way to set the correct time, and not a workaround at all, unfortunately. This implies that twice yearly every machine on the network will have to be restarted for the DST change, as every timezone will change also. (Remember some scheduling software looks at the timezone.) The upside is that the timezone configuration files won't have to be updated when DST start/end dates are changed.

In the end, it seems Beem's correct timezone is currently UTC+2, but will change to UTC+1 shortly.

User avatar
Béèm
Posts: 513
Joined: Sun 16 Apr 2006, 16:18
Location: Brussels

#26 Post by Béèm »

Hi everybody,
I don't get it.
TZ was at PUP-2 and my system time was ok, but in the stray -2 hours.
Reasoning that PUP = UTC I did put PUP+2 in TZ and when the stray was right my clock was -2.
Finaly I did put PUP and now my stray = clock and when creating a new file it's done at the same time.
When tryin PUP-2 or PUP+2 creating a file gave a difference also.
Every time I changed TZ I rebooted.

I just wonder what will happen if I go back to JWM or XP with my clock.
Puppy Linux 2.02 SMkey, KDE354mini, wine0.9.20, devx-qt-renamed.
Puppy Linux 2.10r1 SMkey, JWM, devx_qt_renamed_210, KDE355mini

User avatar
Béèm
Posts: 513
Joined: Sun 16 Apr 2006, 16:18
Location: Brussels

#27 Post by Béèm »

OK then.
Switched to JWM and stray = clock. (W)Oef.
Puppy Linux 2.02 SMkey, KDE354mini, wine0.9.20, devx-qt-renamed.
Puppy Linux 2.10r1 SMkey, JWM, devx_qt_renamed_210, KDE355mini

User avatar
Dyno Spoid
Posts: 37
Joined: Tue 05 Sep 2006, 14:39
Location: Milwaukee, Wisconsin, U.S.A.
Contact:

Window Manager Time Difference

#28 Post by Dyno Spoid »

It sounds like the OS (Puppy Linux) is setting the system clock to the UTC+2 correctly, which can be verified two ways:

1: Check the system clock (hardware) in BIOS
2: Check the OS clock (software) using 'date' after exiting the window manager

If both are not the same, that would be unusual.

If both are the same, which they should be, and the clock in your window manager shows something different, try opening a terminal window and issuing 'date'. If the time is now incorrect in the terminal window, your window manager is set to use the OS clock as if it were set to UTC, making a time zone difference for you, and is ignoring the /etc/TZ file. This could be because the file is usually /etc/timezone. You might solve this problem by creating a link from TZ to timezone (ln -s /etc/TZ /etc/timezone), although your window manager might not understand the TZ file.

If this doesn't work, you can try adjusting the time zone in the window manager either by menu (which you don't seem to have) or by configuration file. There must be a configuration setting somewhere telling the window manager to adjust by two hours.

If the time in the BIOS, OS, and terminal window all match, but your X clock does not, the clock software might have a configuration that is causing the problem.

User avatar
Béèm
Posts: 513
Joined: Sun 16 Apr 2006, 16:18
Location: Brussels

#29 Post by Béèm »

Thanks for the info.
Since I changed in TZ PUP-2 to PUP, the time in the command prompt (outside a WM tho), a terminal, creating a file and stray are the same.
On next boot I will verify in the bios.
So it looks good so far.
Puppy Linux 2.02 SMkey, KDE354mini, wine0.9.20, devx-qt-renamed.
Puppy Linux 2.10r1 SMkey, JWM, devx_qt_renamed_210, KDE355mini

marksouth2000
Posts: 622
Joined: Wed 05 Apr 2006, 20:43

#30 Post by marksouth2000 »

This discussion puzzles me. Don't computer people all just set all their clocks and watches to UTC and keep mental track of their timezone? This is easier on the brain than constantly resetting one's watch, especially when travelling across timezones.

An sntp daemon is still useful, though.

User avatar
Béèm
Posts: 513
Joined: Sun 16 Apr 2006, 16:18
Location: Brussels

#31 Post by Béèm »

@Marksouth,
As a computer user, I would like:
- to see my stray clock = wrist-watch
- not being flamed when answering a post which appears to others as being before the post I answer.
- same for e-mail date and time
- files being created at the time of my wris-watch

So when I travel across a time zone, I readjust my wrist-watch, I don't want to mentaly calculate the local time.

So I expect the PC to behave accordingly.

@all,
Verified my bios clock, it's set correctly
Being in XP now, the clock is still ok.

So I have no more worries.

Only this remark: in PCLinux's KDE things are easier, because when setting time and date there is the worldwide selection of timezones to select from.
Puppy Linux 2.02 SMkey, KDE354mini, wine0.9.20, devx-qt-renamed.
Puppy Linux 2.10r1 SMkey, JWM, devx_qt_renamed_210, KDE355mini

Post Reply