Ohoho, ya this is timezone difference betwen mysql/php problem. Quick fix for you, set correct timezone in system php.ini, see: http://php.net/date.timezone
On 10.09.2014 15:21, Tomasz Karczewski wrote:
SELECT TIMEDIFF(NOW(), UTC_TIMESTAMP);
+--------------------------------+
| TIMEDIFF(NOW(), UTC_TIMESTAMP) |
+--------------------------------+
| 02:00:00 |
+--------------------------------+
1 row in set (1.18 sec)
php -i | grep timezone
PHP Warning: Unknown: 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 Unknown on line 0
Default timezone => UTC
date.timezone => no value => no value
date +%::z
+02:00:00
Tomasz Karczewski
Administrator Sieci
tkarczewski@man.olsztyn.pl
http://www.man.olsztyn.pl http://www.uwm.edu.pl
tel. (89) 523 45 55 fax. (89) 523 43 47
Ośrodek Eksploatacji i Zarządzania
Miejską Siecią Komputerową OLMAN w Olsztynie
Uniwersytet Warmińsko-Mazurski w Olsztynie
*From:*observium [mailto:observium-bounces@observium.org] *On Behalf Of *Mike Stupalov *Sent:* Wednesday, September 10, 2014 1:00 PM *To:* Observium Network Observation System *Subject:* Re: [Observium] Eventlog time and date
Hi,
On 10.09.2014 13:07, Tomasz Karczewski wrote:
Hi there, I've got one question. Fresh eventlogs and syslogs have format -1y -1d -2h <https://observium.man.olsztyn.pl/> . How to change it?
pls show some info for your server:
- mysql timezone, from console:
$ mysql SELECT TIMEDIFF(NOW(), UTC_TIMESTAMP);
- php timezone:
$ php -i | grep timezone
- system timezone:
$ date +%::z
Tomasz Karczewski
Administrator Sieci
tkarczewski@man.olsztyn.pl mailto:tkarczewski@man.olsztyn.pl
http://www.man.olsztyn.pl http://www.uwm.edu.pl
tel. (89) 523 45 55 fax. (89) 523 43 47
Ośrodek Eksploatacji i Zarządzania
Miejską Siecią Komputerową OLMAN w Olsztynie
Uniwersytet Warmińsko-Mazurski w Olsztynie
observium mailing list observium@observium.org mailto:observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
-- Mike Stupalov http://observium.org
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium