Created
April 9, 2015 17:02
-
-
Save roborourke/0d4fbced7c500fe37d6f to your computer and use it in GitHub Desktop.
strptime issue 5.5 problem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
setlocale( LC_TIME, 'fr_FR' ); | |
$date = strptime( '03 juin 2015 00:00:00', '%d %B %Y %H:%M:%S' ); | |
$time = mktime( 0, 0, 0, $date['tm_mon'] + 1, $date['tm_mday'], $date['tm_year'] + 1900 ); | |
var_dump( $date, $time, date( 'Y-m-d H:i:s', $time ) ); | |
// on 5.5 returns false, 0, 1970-etc... | |
// on 5.6 returns array(), NNNNNNNNNN, 2015-06-03 00:00:00 | |
// halps |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment