check time is not in sync with the system time
check time is not in sync with the system time
Our nagios servers are configured to use Europe/London time ("BST") (used to be UTC in the past).
We've verified that the system profile show the correct system & PHP time.
On the other hand the last/next check time for a service is now one hour behind (probably due to DST).
This is an issue since we need to run some services at a specific London local time. We can modify the time period -1h but then we'll have to modify it each time the DST changes.
Please advise why the check time is not in sync with the system time.
We've verified that the system profile show the correct system & PHP time.
On the other hand the last/next check time for a service is now one hour behind (probably due to DST).
This is an issue since we need to run some services at a specific London local time. We can modify the time period -1h but then we'll have to modify it each time the DST changes.
Please advise why the check time is not in sync with the system time.
Re: check time is not in sync with the system time
What is the output of the following command?
Code: Select all
cat /etc/sysconfig/clockBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: check time is not in sync with the system time
Zone = "UTC"
so what do we do next?
so what do we do next?
Re: check time is not in sync with the system time
What did you set as your "localtime" and your php time?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: check time is not in sync with the system time
All I changed in the php.ini is the date.timezone
Can you tell me what else I need to change?
Can you tell me what else I need to change?
Re: check time is not in sync with the system time
You will need to set the system time zone: /etc/localtime
If you have access to the internet on your XI system, you should consider using the ntp client as well.
Code: Select all
cp /usr/share/zoneinfo/Europe/London /etc/localtimeFormer Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: check time is not in sync with the system time
I did that! This is why the system date is ok.
What I need to change on the php.ini?
What I need to change on the php.ini?
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: check time is not in sync with the system time
If the system is showing the correct PHP time to you then you must have it already set correctly, the line which would be changed would be:
In:
What timezone did you choose for the php.ini file? Is it a timezone which properly uses DST?
Code: Select all
date.timezoneCode: Select all
/etc/php.iniRe: check time is not in sync with the system time
/etc/localtime is set to Europe/London
In the php.ini date.timezone is the same.
Both system time and php time show the correct BST time.
The problem is with Nagious last & next check time that is 1 hour behind (still utc)
Please look back on this thread, somehow the sysconfig show zone=utc
In the php.ini date.timezone is the same.
Both system time and php time show the correct BST time.
The problem is with Nagious last & next check time that is 1 hour behind (still utc)
Please look back on this thread, somehow the sysconfig show zone=utc
Re: check time is not in sync with the system time
Is the bios clock correct?
Is ntp an option?
Code: Select all
hwclock --showFormer Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.