If your clock time is always wrong, there are 4 possible issues:
- wrong timezone
- wrong selection of UTC versus local time
- BIOS clock set wrong
- time drift
These issues are usually addressed in MX-15 using Start menu > System > TimeSet, in MX-16 with Start menu > System > Time Settings. The command line method described here may be desired or–in the case of antiX–required.
Open a root terminal and enter:
Do this first. You should also be able to just check the current value with “cat /etc/timezone”.
Selection of UTC/local time
Once you are sure the timezone is correct, you can work on setting your BIOS clock. Do this with the hwclock command. First do a
and then run
to see what it is set to. It always reports in local time which is why you need to first make sure your timezone is set correctly.
Then use one of the following:
depending on whether you want your hardware clock to be set to localtime or utc. Most pure Linux systems use utc. Most dual boot systems use localtime.
Then you can use “hwclock –systohc” to set the hardware clock so it matches your system time. Again, you need the timezone and localtime/utc choice set correctly first (although if you want to *assume* they are set correctly already then this is the only command you need to run to get your changes to the “date” command to stick. If you assumed incorrectly then you will likely get mysteriously screwed by DST a few times per year).
Finally, if you are having problems with hwclock drift or if you are a perfectionist then you can install the [b]ntp[/b] package which will use time servers on the net to keep your clock exactly on time. But you have to first go through the steps above before ntp will work correctly.