Page 1 of 1

Date-Time for a timezone

Posted: Wed Apr 16, 2014 11:38 am
by Sbergonzi
I updated the php.ini to be East Coast time in support of the "Last Updated" note under each dashlet. What I'm now curious about is the actual data. Would the x-axis also be in EST?

Re: Date-Time for a timezone

Posted: Wed Apr 16, 2014 3:48 pm
by tmcdonald
It should be EST as well. The right-most side of the graph is the current time, and the x-axis labels are very 6 hours, so you can eyeball it and see if the current time is an appropriate distance from the last label.

Re: Date-Time for a timezone

Posted: Wed Apr 16, 2014 4:02 pm
by Sbergonzi
I took this pic at 15:00 EST and it shows 21:00 at the right most point. That confused me.

Re: Date-Time for a timezone

Posted: Wed Apr 16, 2014 4:06 pm
by tmcdonald
Is your system time synced up with your PHP time?

Please run the following:

Code: Select all

grep "date.timezone" /etc/php.ini
php -r 'echo date("D M j G:i:s T Y")."\n";'
date

Re: Date-Time for a timezone

Posted: Wed Apr 16, 2014 4:18 pm
by Sbergonzi
My 12-hour math was wrong earlier, it was 2 p.m. PST which is 5 p.m. EST/17:00 EST.

It looks like it's not. Should i fix the system time and that will fix the graph times?

[root@Nagios1 ~]# grep "date.timezone" /etc/php.ini
; http://www.php.net/manual/en/datetime.c ... e.timezone
date.timezone = America/New_York
[root@Nagios1 ~]# php -r 'echo date("D M j G:i:s T Y")."\n";'
Wed Apr 16 17:16:29 EDT 2014
[root@Nagios1 ~]# date
Wed Apr 16 21:16:33 UTC 2014
[root@Nagios1 ~]#

Re: Date-Time for a timezone

Posted: Wed Apr 16, 2014 4:25 pm
by tmcdonald
The following should fix you up:

Code: Select all

rm /etc/localtime
cp /usr/share/zoneinfo/America/New_York /etc/localtime
assuming that New York is the proper system time you would want. As long as PHP matches the system you are fine.

Re: Date-Time for a timezone

Posted: Wed Apr 16, 2014 4:58 pm
by Sbergonzi
good to go! thank you!

yes, our data center is on the east coast so all times EST.

Re: Date-Time for a timezone

Posted: Wed Apr 16, 2014 5:02 pm
by tmcdonald
Sbergonzi wrote:good to go! thank you!

yes, our data center is on the east coast so all times EST.
Great. It will take a bit for everything to sync up and you may see some issues until then.

I'll be closing this thread now, but feel free to open another if you need anything in the future!