• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Date totally wrong on server

Red Squirrel

No Lifer
I have a dedicated server in TX and noticed the date is totally wrong. Even if I do a ntpdate, it's still wrong.

I have the time zone set to GMT-5 since there is no entry for Eastern Time, and I did ntpdate time.nist.gov just to make sure it'is set, but it still says it's 7:06 Feb 21 2010 when it should really be 9:06 on Feb 20.

Also when I go in setup, should the check box "System clock uses UTP" be checked? I tried either way and it does not seem to change anything. By default it's unchecked so I left it back that way.

Also this is weird, I ran tzselect and this was the result:

Code:
The following information has been given:

        Canada
        Eastern Time - Ontario - most locations

Therefore TZ='America/Toronto' will be used.
Local time is now:      Sat Feb 20 21:22:40 EST 2010.
Universal Time is now:  Sun Feb 21 02:22:40 UTC 2010.
Is the above information OK?
1) Yes
2) No
#? 1

You can make this change permanent for yourself by appending the line
        TZ='America/Toronto'; export TZ
to the file '.profile' in your home directory; then log out and log in again.

Here is that TZ value again, this time on standard output so that you
can use the /usr/bin/tzselect command in shell scripts:
America/Toronto
[root@shared1 ~]#
[root@shared1 ~]#
[root@shared1 ~]# date
Sun Feb 21 07:23:04 GMT-5 2010

The line:

Local time is now: Sat Feb 20 21:22:40 EST 2010.

Is correct. I don't know what the other one is.

Yet, the date is still wrong. This is screwing up my mail server. I rarely send mail directly from this server so I only noticed this now when I did try to send an email and it got hit for spam because of the time being wrong.
 
Last edited:
The naming of timezones is kind of odd, for example Eastern is American/New_York. However, TX isn't in the Eastern timezone anyway.
 
I actually want it to be my time zone (ET) just so it's easier for me when reading logs and such. Or does it have to match with the physical location? Does NTP take the location into account when updating? (ex: by IP) I would assume not as it would be insane to keep track of all the ranges.

It seems to be working fine now, anyway.
 
NTP should update to UTC, your system then applies an offset for your locale. (hwclock should be UTC).
 
I clicked into this thread thinking it'd be Virtual Machine-related. 😛

Glad you got it working. Time/Date issues are a pain...especially when trying to synchronize logs.
 
Hardware clocks should always be set to UTC/GMT. Doing anything else would be silly. Or Microsoftish. 😉
Anyhow UTC FTW.
And BSD FTW:
$ ls -l /etc/localtime
lrwxr-xr-x 1 root wheel 27 Feb 18 11:17 /etc/localtime -> /usr/share/zoneinfo/EST5EDT
 
Back
Top