[CentOS] time zone

Wed Feb 1 02:38:35 UTC 2017
TE Dukes <tdukes at palmettoshopper.com>


> -----Original Message-----
> From: CentOS [mailto:centos-bounces at centos.org] On Behalf Of Richard
> Sent: Tuesday, January 31, 2017 7:52 PM
> To: CentOS mailing list
> Subject: Re: [CentOS] time zone
> 
> 
> 
> > Date: Tuesday, January 31, 2017 19:35:46 -0500
> > From: TE Dukes <tdukes at palmettoshopper.com>
> >
> >> From: CentOS [mailto:centos-bounces at centos.org] On Behalf Of Richard
> >> Sent: Tuesday, January 31, 2017 6:46 PM
> >>
> >> > Date: Tuesday, January 31, 2017 18:16:36 -0500
> >> > From: TE Dukes <tdukes at palmettoshopper.com>
> >> >
> >> >> From: CentOS [mailto:centos-bounces at centos.org] On Behalf Of
> >> >> Richard Sent: Tuesday, January 31, 2017 5:19 PM
> >> >>
> >> >>
> >> >> > Date: Tuesday, January 31, 2017 16:59:32 -0500
> >> >> > From: TE Dukes <tdukes at palmettoshopper.com>
> >> >>
> >> >> >
> >> >> > From: CentOS [mailto:centos-bounces at centos.org] On Behalf Of
> >> >> > Richard Sent: Tuesday, January 31, 2017 4:44 PM
> >> >>
> >> >> >
> >> >> >> Date: Tuesday, January 31, 2017 16:02:37 -0500
> >> >> >> From: TE Dukes <tdukes at palmettoshopper.com>
> >> >> >>
> >> >> >> Today, I started getting this error when trying to login to
> >> >> >> zoneminder:
> >> >> >>
> >> >> >> ZoneMinder is not installed properly: php's date.timezone is
> >> >> >> not set to a valid timezone
> >> >> >>
> >> >> >> Zoneminder has been running since last Wednesday when I
> >> >> >> installed it. Today, I get this.
> >> >> >>
> >> >> >> In /etc/php.ini, I have date.timezone = America/New_York, which
> >> >> >> I added when zoneminder was installed.
> >> >> >>
> >> >> >> Output from date: Tue Jan 31 15:56:26 EST 2017
> >> >> >>
> >> >> >> Output from ll /etc/localtime: lrwxrwxrwx. 1 root root 38 Jan
> >> >> >> 25 19:05 /etc/localtime ->
> >> >> >> ../usr/share/zoneinfo/America/New_York
> >> >> >>
> >> >> >> Been searching for hours for another file that may be
> >> >> >> overriding php.ini
> >> >> >>
> >> >> >
> >> >> > Put a simple php page on your/the server (where zoneminder is
> >> >> > running) with the "phpinfo()" function, and then look at the
> >> >> > timezone information in the "date" section of the output.
> >> >> >
> >> >> > If it isn't showing the correct value, check the location of the
> >> >> > php.ini that is being used in the "Loaded Configuration File"
> >> >> > value toward the top of that output.
> >> >> >
> >> >> > By default, php doesn't use the system's TZ,
> >> >> >
> >> >> >
> >> >> > Hello,
> >> >> >
> >> >> > I did, it shows the error about not being correctly set:
> >> >> >
> >> >> > Warning: phpinfo(): It is not safe to rely on the system's
> >> >> > timezone settings. You are *required* to use the date.timezone
> >> >> > setting or the date_default_timezone_set() function. In case you
> >> >> > used any of those methods and you are still getting this
> >> >> > warning, you most likely misspelled the timezone identifier. We
> >> >> > selected the timezone 'UTC' for now, but please set
> >> >> > date.timezone to select your timezone. in
> >> >> > /var/www/html/phpinfo.php on line 4
> >> >> >
> >> >> > Why would it just start doing this?
> >> >> >
> >> >>
> >> >> Obviously can't answer that as we don't know enough about what
> >> >> changes you may have made to your system. The default php.ini
> >> >> doesn't have a TZ set, so will always give that message
> >> >> unless/until you add a TZ.
> >> >>
> >> >> However, to fix this:
> >> >>
> >> >>   - check the location of the php.ini that is being referenced,
> >> >>     as indicated above (generally /etc/php.ini).
> >> >>
> >> >>   - edit that php.ini file to set a correct TZ following the
> >> >>     "date.timezone =" entry.
> >> >>
> >> >>   - be certain to uncomment that line.
> >> >>
> >> >>   - you probably need to restart the apache server to get any
> >> >>     change picked up.
> >> >>
> >> >
> >> > [Date]
> >> > ; Defines the default timezone used by the date functions ;
> >> > http://php.net/date.timezone date.timezone = America/New_York
> >> >
> >> > Its set. Not sure why its not seeing it. The only changes I made to
> >> > php.ini was this last week when I installed 7.3 and zoneminder.
> >> >
> >> > Its been working up till about noon today.
> >> >
> >>
> >> You need to make certain that the php.ini where you have that setting
> >> is
> > the
> >> one that is being referenced by the server. See above notes on
> >> checking that.
> >>
> >> The apache server needs to be restarted to load changes made to the
> >> php.ini.
> >>
> >> These things don't change "magically". If this worked until noon, I'd
> > check
> >> various logs to see who/what made changes then - including looking to
> >> see
> > if
> >> the apache server was restarted then and loaded changes made
> >> previously.
> >>
> >>
> >
> > Here's an excerpt from /var/log/messages:
> >
> > Jan 31 12:15:19 ts130 zmc_dvideo0[13838]: INF [Den: 57000 - Capturing
> > at 29.41 fps] Jan 31 12:15:19 ts130 zmc_dvideo1[13864]: INF [Deck:
> > 57000 - Capturing at 30.30 fps] Jan 31 12:15:19 ts130
> > zmc_dvideo2[13890]: INF [Front: 57000 - Capturing at 30.30 fps] Jan 31
> > 12:15:19 ts130 zma_m1[13847]: INF [Den: 57000 - Analysing at
> > 30.30 fps]
> > Jan 31 12:15:20 ts130 zmc_dvideo3[13917]: INF [Street: 57000 -
> > Capturing at 29.41 fps] Jan 31 12:15:20 ts130 zma_m2[13873]: INF
> > [Deck: 57000 - Analysing at 29.41 fps] Jan 31 12:15:20 ts130
> > zma_m3[13899]: INF [Front: 57000 - Analysing at 29.41 fps] Jan 31
> > 12:15:20 ts130 zma_m4[13925]: INF [Street: 57000 - Analysing at 30.30
> > fps] Jan 31 12:15:41 ts130 web_php[15770]: FAT [ZoneMinder is not
> > installed properly: php's date.timezone is not set to a valid
> > timezone] Jan 31 12:15:46 ts130 web_php[15770]: FAT [ZoneMinder is not
> > installed properly: php's date.timezone is not set to a valid
> > timezone] Jan 31 12:15:47 ts130 web_php[15770]: FAT [ZoneMinder is not
> > installed properly: php's date.timezone is not set to a valid
> > timezone] Jan 31 12:15:52 ts130 zmc_dvideo0[13838]: INF [Den: 58000
> > - Capturing at 30.30 fps]
> > Jan 31 12:15:52 ts130 zmc_dvideo1[13864]: INF [Deck: 58000 - Capturing
> > at 30.30 fps] Jan 31 12:15:53 ts130 zmc_dvideo2[13890]: INF [Front:
> > 58000 - Capturing at 29.41 fps] Jan 31 12:15:53 ts130 zma_m1[13847]:
> > INF [Den: 58000 - Analysing at
> > 29.41 fps]
> > Jan 31 12:15:53 ts130 zmc_dvideo3[13917]: INF [Street: 58000 -
> > Capturing at 30.30 fps] Jan 31 12:15:53 ts130 zma_m2[13873]: INF
> > [Deck: 58000 - Analysing at 30.30 fps] Jan 31 12:15:53 ts130
> > zma_m3[13899]: INF [Front: 58000 - Analysing at 30.30 fps] Jan 31
> > 12:15:54 ts130 zma_m4[13925]: INF [Street: 58000 - Analysing at 29.41
> > fps]
> >
> > The 12:15 mark is when it first started.
> >
> > Any ideas?
> 
> That's reporting the problem. You need to look deeper to see what caused
> the change.
> 
> First I would confirm that the php.ini file where you have the TZ set is
the
> one being referenced. Look at your phpinfo() output for that.
> If so, check when that file was last written compared to when the apache
> server was last loaded.
> 
> With the TZ setting that you report as being in your php.ini the output
from
> the phpinfo() should show that TZ. Since it's not, I suspect that the
php.ini
> that you are editing either isn't the one that is being loaded or was
changed
> after the last apache [re]start.
> 
> 

There have been no changes to the php.ini. Not sure how to output phpinfo to
a text file for posting.

System 	Linux ts130.palmettodomains.com 3.10.0-514.6.1.el7.x86_64 #1 SMP Wed
Jan 18 13:06:36 UTC 2017 x86_64
Build Date 	Nov 6 2016 00:30:05
Server API 	Apache 2.0 Handler
Virtual Directory Support 	disabled
Configuration File (php.ini) Path 	/etc
Loaded Configuration File 	/etc/php.ini

date

Warning: phpinfo(): It is not safe to rely on the system's timezone
settings. You are *required* to use the date.timezone setting or the
date_default_timezone_set() function. In case you used any of those methods
and you are still getting this warning, you most likely misspelled the
timezone identifier. We selected the timezone 'UTC' for now, but please set
date.timezone to select your timezone. in /var/www/html/phpinfo.php on line
4
date/time support 	enabled
"Olson" Timezone Database Version 	0.system
Timezone Database 	internal
Default timezone 	UTC

It is using UTC as the default time zone.

This could possibly be a bug in zoneminder. Not sure. Odd that after almost
a week, this happens.

I have posted in their forum.

Thanks