Timezone Issue - Data is being logged in UTC instead of PST
Moderators: Developers, Moderators
-
- Posts: 7
- Joined: Tue Feb 24, 2015 4:15 pm
Timezone Issue - Data is being logged in UTC instead of PST
I have come across many threads that tackle this issue. However, I cannot zero in on the problem using those. Someone please help me out.
System Timezone - PST
Database Timezone - SYSTEM (i.e. PST)
php.ini has date.timezone set as 'America/Los_Angeles'. However, php --ini shows Loaded Configuration File -> (none). Is that the root cause? If yes, how do I fix it?
In Console->System Utils->Tech Support, default timezone is America/Los-Angeles i.e PST. But the Cacti Log still shows readings being stamped with UTC in the RRDs.
If I run php -r "echo date_default_timezone_get();", I get the following output:
Warning: date_default_timezone_get(): 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 Command line code on line 1
UTC[yogesh@oea11 yogesh]$
Thanks a bunch!
System Timezone - PST
Database Timezone - SYSTEM (i.e. PST)
php.ini has date.timezone set as 'America/Los_Angeles'. However, php --ini shows Loaded Configuration File -> (none). Is that the root cause? If yes, how do I fix it?
In Console->System Utils->Tech Support, default timezone is America/Los-Angeles i.e PST. But the Cacti Log still shows readings being stamped with UTC in the RRDs.
If I run php -r "echo date_default_timezone_get();", I get the following output:
Warning: date_default_timezone_get(): 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 Command line code on line 1
UTC[yogesh@oea11 yogesh]$
Thanks a bunch!
Re: Timezone Issue - Data is being logged in UTC instead of
I'd guess there are multiple php.ini files and the one you've edited actually isnt in use. What does the phpinfo show for the 'Configuration File (php.ini) Path' ?
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
-
- Posts: 7
- Joined: Tue Feb 24, 2015 4:15 pm
Re: Timezone Issue - Data is being logged in UTC instead of
Thanks for the prompt reply!
Here's a clipping of the phpinfo() results
Configuration File (php.ini) Path => /usr/local/apache2/conf
Loaded Configuration File => (none)
Scan this dir for additional .ini files => (none)
Additional .ini files parsed => (none)
Here's a clipping of the phpinfo() results
Configuration File (php.ini) Path => /usr/local/apache2/conf
Loaded Configuration File => (none)
Scan this dir for additional .ini files => (none)
Additional .ini files parsed => (none)
Re: Timezone Issue - Data is being logged in UTC instead of
Does php.ini reside in /usr/local/apache2/conf/ ?
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
-
- Posts: 7
- Joined: Tue Feb 24, 2015 4:15 pm
Re: Timezone Issue - Data is being logged in UTC instead of
Yes, It is present there.
-r-------- 1 root root 423 Nov 13 2013 php.ini
-r-------- 1 root root 423 Nov 13 2013 php.ini
Re: Timezone Issue - Data is being logged in UTC instead of
What user is apache running as? Because I bet your problem is the permissions you have on that file.
-
- Posts: 7
- Joined: Tue Feb 24, 2015 4:15 pm
Re: Timezone Issue - Data is being logged in UTC instead of
Apache is running as nobody. I used the ps -ef | grep httpd | grep -v `whoami` | grep -v root | head -n1 | awk '{print $1}' command to check that.
Re: Timezone Issue - Data is being logged in UTC instead of
I would change the permissions on the php.ini file to 0644 and see if that helps.
-
- Posts: 7
- Joined: Tue Feb 24, 2015 4:15 pm
Re: Timezone Issue - Data is being logged in UTC instead of
Hi,
I did that yesterday. Changed the permissions to 644 and even 777. Didnt seem to make a difference. I restarted the server but the config file wasnt getting loaded.
Noob Question: I was restarting the server using service apache restart. Is this the correct command?
Thanks again for all your inputs, guys!
Yogesh
I did that yesterday. Changed the permissions to 644 and even 777. Didnt seem to make a difference. I restarted the server but the config file wasnt getting loaded.
Noob Question: I was restarting the server using service apache restart. Is this the correct command?
Thanks again for all your inputs, guys!
Yogesh
Who is online
Users browsing this forum: No registered users and 3 guests