2017-01-27 2 views
0

Ich habe gerade seltsamen Unterschied in php binäre Zeitzone Ausgabe gefunden, was kann das verursachen?php Binär-und System-Timestamp seltsame Unterschied

[[email protected] ~]# php -r 'echo date("H:m:s"). "\n";' 
17:01:54 

während Systemzeit ist:

[email protected] ~]# date 
friday, 27 January 2017 17:34:42 +0100 

Die Systemzeitzone Europe/Berlin sowie php.ini Einstellungen ist:

[[email protected] ~]# php -i | grep 'php.ini' 
Configuration File (php.ini) Path => /usr/local/lib 
Loaded Configuration File => /usr/local/lib/php.ini 

[[email protected] ~]# cat /usr/local/lib/php.ini | grep timezone 
; Defines the default timezone used by the date functions 
date.timezone = Europe/Berlin 

Systemzeitzone:

[[email protected] ~]# date +'%:z %Z' 
+01:00 CET 
+4

Das Format Zeichen für Minuten ist 'I' reintalled. 'm' ist ein zweistelliger Monat. Es ist Januar, keine Überraschung, dass Sie "01" sehen. – cHao

Antwort

0

als cHao sagte, die Frage in einem falschen m Modifikator war echo date("H:m:s")echo date("H:i:s") sein sollte, und ich hatte auch tzdata Paket und alles geht gut