Time difference, locale probem
-
When testing you calendar plugin, I noticed that now (almost midnight here in Finland), your calendar started showing that it is already 5 March, although it is still 4 March.
I checked date-utilities.php and did some testing, regarding function mc_dateclass( $current ).
Test:
$now = current_time( 'timestamp' ); $dayclass = sanitize_html_class( strtolower( date_i18n( 'l', $now ) ) ) . ' ' . sanitize_html_class( strtolower( date_i18n( 'D', $now ) ) ); $date = date( "Ymd", $now ); $time = date("D M j G:i:s T Y", $now); echo $now . '<br>'; echo $dayclass . '<br>'; echo $date . '<br>'; echo $time;Result:
1520206916 maanantai ma (this is "Sunday su" in Finnish) 20180305 Mon Mar 5 1:41:56 EET 2018Command line:
date Sun Mar 4 23:41:56 EET 2018Two hours difference although time zone (EET) is the same?
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
The topic ‘Time difference, locale probem’ is closed to new replies.