-
system time wrong
Hi
I have a system running community suse 10.2 linux
I have configured webmin to update the system time via
au.pool.ntp.org , time zone is Melbourne/Australia
When I do the date command, the outputted time is 1 hour slow. This
suggests it is something to do with daylight savings.
What complicates the issue is that the PHP web applications on the
server are displaying the correct time! If I manually correct the
system time, it puts the PHP web applications 1 hour in the future!
Very confused. any help appreciated
cheers David
-
Re: system time wrong
"linuxnooby@yahoo.com.au" <linuxnooby@yahoo.com.au> writes:
[color=blue]
>Hi[/color]
[color=blue]
>I have a system running community suse 10.2 linux[/color]
[color=blue]
>I have configured webmin to update the system time via
>au.pool.ntp.org , time zone is Melbourne/Australia[/color]
[color=blue]
>When I do the date command, the outputted time is 1 hour slow. This
>suggests it is something to do with daylight savings.[/color]
ntp has absolutely nothing to do with daylight saving. Your system time has
absolutely nothing to do with daylight saving. Both use UTC which is the
same all over the world.
The local time is set by reference to /etc/localtime which should be the
file /usr/share/zoneinfo/Australia/Melbourne
And that file should be recent since Australia keeps changing its
definition of daylight saving time.
[color=blue]
>What complicates the issue is that the PHP web applications on the
>server are displaying the correct time! If I manually correct the
>system time, it puts the PHP web applications 1 hour in the future![/color]
[color=blue]
>Very confused. any help appreciated[/color]
[color=blue]
>cheers David[/color]
-
Re: system time wrong
On Thu, 23 Oct 2008, in the Usenet newsgroup alt.os.linux.suse, in article
<66437708-2c24-4328-a02f-da94f436180c@x16g2000prn.googlegroups.com>,
[email]linuxnooby@yahoo.com.au[/email] wrote:
NOTE: Posting from groups.google.com (or some web-forums) dramatically
reduces the chance of your post being seen. Find a real news server.
[color=blue]
>I have a system running community suse 10.2 linux
>
>I have configured webmin to update the system time via
>au.pool.ntp.org , time zone is Melbourne/Australia[/color]
1. NTP is UTC only, and has no concept of timezones, much less daylight
savings times.
2. Can't help on webmin - I don't use windoze.
[color=blue]
>When I do the date command, the outputted time is 1 hour slow. This
>suggests it is something to do with daylight savings.[/color]
What is the difference between 'date -u' and 'date'? The first will
show UTC, while the second should show what the system libraries think
is local time. Lessee, Melbourne?
[compton ~]$ /usr/sbin/zdump -v Australia/Melbourne | grep 2008
Australia/Melbourne Sat Apr 5 15:59:59 2008 GMT = Sun Apr 6 02:59:59
2008 EST isdst=1
Australia/Melbourne Sat Apr 5 16:00:00 2008 GMT = Sun Apr 6 02:00:00
2008 EST isdst=0
Australia/Melbourne Sat Oct 4 15:59:59 2008 GMT = Sun Oct 5 01:59:59
2008 EST isdst=0
Australia/Melbourne Sat Oct 4 16:00:00 2008 GMT = Sun Oct 5 03:00:00
2008 EST isdst=1
[compton ~]$ /usr/sbin/zdump Australia/Melbourne ; date -u
Australia/Melbourne Sat Oct 25 06:49:44 2008 EST
Fri Oct 24 19:49:44 UTC 2008
[compton ~]$
Looks like 11 hours. (I have to use 'zdump' here, because I'm a quarter
of the way around the world from Melbourne and am not in the same
timezone ;-)
[color=blue]
>What complicates the issue is that the PHP web applications on the
>server are displaying the correct time! If I manually correct the
>system time, it puts the PHP web applications 1 hour in the future![/color]
Is that the same system? Or are you seeing some strange crap because
of UTC timestamps used in *nix.
You might want to check to see what time zone file package you have.
The command is probably 'rpm -q tzdata'. Oz changed the effective
dates for start/end of daylight savings time from 'last Sunday in
October and March' to 'first Sunday in October and April' back in
July of last year, so your tzdata file has to be based on tzdata2007g
that was released on Aug 20, 2007, OR LATER (though there were no
changes to the Australian zonefiles since that date). The latest
tzdata source file (on [url]ftp://elsie.nci.nih.gov/pub[/url] - which may not
be available through your errata program yet) is tzdata2008h.tar.gz
dated 11 days ago (it only effected Mauritius and Syria).
Old guy
-
Re: system time wrong
[email]linuxnooby@yahoo.com.au[/email] wrote:[color=blue]
> I have a system running community suse 10.2 linux
>
> I have configured webmin to update the system time via
> au.pool.ntp.org , time zone is Melbourne/Australia
>
> When I do the date command, the outputted time is 1 hour slow. This
> suggests it is something to do with daylight savings.[/color]
As much as there is wrong with daylight savings in itself, I doubt that
is the problem.
[color=blue]
> What complicates the issue is that the PHP web applications on the
> server are displaying the correct time! If I manually correct the
> system time, it puts the PHP web applications 1 hour in the future!
>
> Very confused. any help appreciated[/color]
What time is the bios? A simple `date` should show you the correct time.
Unless you have a dual boot, the time must be UTC. In YaST, System. Date
and Time, you must also select 'Hardware Clock Set To UTC'. Also select
the coorect timezone there.
Once you have gotten that, all should be well. If php then still shows
the wrong time, the problem is php related and should be solved there.
Obviously see that you have done an update. I know that in the past just
after some version came out, dates for daylight changed and without it,
you would get a difference during at least 2 or 3 weeks.
houghi
--
Theologians can pursuade themselves of anything. Anyone who can worship
a trinity and insists that his religion is a monotheism can believe
anything -- just give him time to rationalize it.
Robert A. Heinlein, JOB: A Comedy of Justice
-
Re: system time wrong
[email]linuxnooby@yahoo.com.au[/email] wrote:[color=blue]
> Hi
>
> I have a system running community suse 10.2 linux
>
> I have configured webmin to update the system time via
> au.pool.ntp.org , time zone is Melbourne/Australia
>
> When I do the date command, the outputted time is 1 hour slow. This
> suggests it is something to do with daylight savings.
>
> What complicates the issue is that the PHP web applications on the
> server are displaying the correct time! If I manually correct the
> system time, it puts the PHP web applications 1 hour in the future!
>
> Very confused. any help appreciated
>
> cheers David[/color]
Is your computer about 5 years old? Might be time to change the battery
on the motherboard.
You didn't give much detail of your situation so I'm guessing.
Regards,
Werner
-
Re: system time wrong
On Sun, 26 Oct 2008, in the Usenet newsgroup alt.os.linux.suse, in article
<gdvjt1$1f4q$1@adenine.netfront.net>, Werner wrote:
[color=blue]
>linuxnooby@yahoo.com.au wrote:[/color]
[color=blue][color=green]
>> I have a system running community suse 10.2 linux[/color][/color]
and how old is that?
[color=blue][color=green]
>> I have configured webmin to update the system time via
>> au.pool.ntp.org , time zone is Melbourne/Australia[/color][/color]
Australia changed the effective dates for start/end of daylight savings
time from 'last Sunday in October and March' to 'first Sunday in
October and April' back in July of last year. NTP can be set up
to initially set the system time (though this is not the default
behavior, and OTHERWISE, NTP will not correct a time error in excess
of about 15 minutes) - but the NTP protocol only knows UTC and you then
depend on the timezone files to determine the correct wall-clock time.
[color=blue][color=green]
>> When I do the date command, the outputted time is 1 hour slow. This
>> suggests it is something to do with daylight savings.
>>
>> What complicates the issue is that the PHP web applications on the
>> server are displaying the correct time! If I manually correct the
>> system time, it puts the PHP web applications 1 hour in the future![/color][/color]
[color=blue]
>Is your computer about 5 years old? Might be time to change the battery
>on the motherboard.[/color]
CMOS batteries don't put _some_ times off by an hour, and some not.
The CMOS battary powers the hardware clock when the computer is off.
When the system is on, power for the hardware clock is often derived
from the +5 logic. Additionally, the hardware clock is only used
to initially set the system clock. The system clock in an Intel type
of system (includes AMD, Cyrix, and similar) is a software counter in
the kernel that counts hardware interrupts. You can see this by finding
a command line, and issuing the command 'cat /proc/interrupts' ten
seconds apart. Look at the difference in the counts for IRQ 0.
Depending on how your kernel was compiled, there may be 100, 200, 500,
or 1000 interrupts _per_second_ recorded for that IRQ.
Old guy
-
Re: system time wrong
Thanks for all the replies.
Turned out the timezone package needed to be updated, time would have
been displaying incorrectly for 3 weeks
When I looked at the server today the system time was displaying
correctly for daylight savings. (Today is after last weekend in
october, last week was not).
In any case I installed latest timezone package , timezone
2.5-34.13.rpm
Again thanks for the replies. I have learnt something
cheers David
[color=blue]
> You might want to check to see what time zone file package you have.
> The command is probably 'rpm -q tzdata'. *Oz changed the effective
> dates for start/end of daylight savings time from 'last Sunday in
> October and March' to 'first Sunday in October and April' back in
> July of last year, so your tzdata file has to be based on tzdata2007g
> that was released on Aug 20, 2007, *OR LATER (though there were no
> changes to the Australian zonefiles since that date). The latest
> tzdata source file (onftp://elsie.nci.nih.gov/pub- which may not
> be available through your errata program yet) is tzdata2008h.tar.gz
> dated 11 days ago (it only effected Mauritius and Syria).
>
> * * * * Old guy[/color]
-
Re: system time wrong
[email]inuxnooby@yahoo.com.au[/email] wrote:[color=blue]
> Thanks for all the replies.
>
> Turned out the timezone package needed to be updated, time would have
> been displaying incorrectly for 3 weeks[/color]
1) Please do not toppost
2) Told you so
houghi
--
But I will accept the rules that you feel necessary to your freedom. I am
free, no matter what rules surround me. If I find them tolerable, I
tolerate them; if I find them too obnoxious, I break them. I am free
because I know that I alone am morally responsible for everything I do.
-
Re: system time wrong
houghi <houghi@houghi.org.invalid> writes:
[color=blue]
>inuxnooby@yahoo.com.au wrote:[color=green]
>> Thanks for all the replies.
>>
>> Turned out the timezone package needed to be updated, time would have
>> been displaying incorrectly for 3 weeks[/color][/color]
[color=blue]
>1) Please do not toppost[/color]
Why not? Why do you believe that imposing your bizare notions onto the
world is an appropriate thing to do.
[color=blue]
>2) Told you so[/color]
Why does anyone care that you told him so? Many people did AND told him how
to fix it. People come here with problems that we help them fix. This is
NOT a blame game. I think you must have gotten out of bed on the wrong side
this morning.
[color=blue]
>houghi
>--
>But I will accept the rules that you feel necessary to your freedom. I am
>free, no matter what rules surround me. If I find them tolerable, I
>tolerate them; if I find them too obnoxious, I break them. I am free
>because I know that I alone am morally responsible for everything I do.[/color]
-
Re: system time wrong
<snip>
It seems this problem could have been solved much more easily. I
accepted a kernel update yesterday but after installing it my system
time went wrong, staying behind by about 26 minutes. I fixed it using
YaST by following the instructions from [url]http://en.opensuse.org/SDB:Changing_NTP_Server_-_SDB_Example[/url]
-
Re: system time wrong
On Tue, 28 Oct 2008, in the Usenet newsgroup alt.os.linux.suse, in article
<464cbfaa-7e1c-4ccd-93f2-bf819857313d@l77g2000hse.googlegroups.com>, kiwanuka
wrote:
NOTE: Posting from groups.google.com (or some web-forums) dramatically
reduces the chance of your post being seen. Find a real news server.
[color=blue]
><snip>[/color]
Yes, snipping is good, but it would have helped to have some clue
about what you are referring to.
[color=blue]
>It seems this problem could have been solved much more easily. I
>accepted a kernel update yesterday but after installing it my system
>time went wrong, staying behind by about 26 minutes.[/color]
No, you are discussing a completely different problem - your clock
got mis-set somehow (probably because your CMOS or hardware clock was
incorrect by 26 minutes). In the O/P's case, the _timezone_ information
was outdated. If you look at the 398 timezones used around the world
there are 39 clock offsets (41 if you include daylight saving time)
currently in use:
[compton ~]$ cut -f5 time.2008h/Time.zone.names | sort -un | column
-11:00 -8:00 -4:00 -2:00 2:00 4:30 6:00 8:45 10:30 12:45
-10:00 -7:00 -4:30 -1:00 3:00 5:00 6:30 9:00 11:00 13:00
-9:00 -6:00 -3:00 0:00 3:30 5:30 7:00 9:30 11:30 14:00
-9:30 -5:00 -3:30 1:00 4:00 5:45 8:00 10:00 12:00
[compton ~]$
Google says you are posting from Oxford, and your times should have
reset from BST to GMT very early Sunday morning. Thus, if you can find
a command line, 'date -u ; date' should return the same times, and
'date ; /sbin/hwclock -r' should report _similar_ times to within a few
seconds (because your CMOS clock being on localtime or UTC should still
be the same as your current time).
[color=blue]
>I fixed it using YaST by following the instructions from
> [url]http://en.opensuse.org/SDB:Changing_NTP_Server_-_SDB_Example[/url][/color]
And you missed the O/P's statement that he was using NTP, which only
knows UTC, and has no information about timezones or daylight saving
times. Your timezone configuration has to be correct.
Old guy