#33288 [Bgs]: strtotime() error on dates ranging from 2006-05-01 to 2006-05-31 with Swedish.

From: Date: Thu, 09 Jun 2005 21:15:11 +0000
Subject: #33288 [Bgs]: strtotime() error on dates ranging from 2006-05-01 to 2006-05-31 with Swedish.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-80109@lists.php.net to get a copy of this message
ID: 33288 User updated by: henke at mac dot se Reported By: henke at mac dot se Status: Bogus Bug Type: Date/time related Operating System: Win 2003 Server PHP Version: 5.0.4 New Comment: Yepp I realized that. The darn dates are outputted from MSSQL DB and it work when using PHP 4.3 but when they upgraded to Win 2003 and PHP 5.04 I guess the ouput changed from 24 May to 24 Maj when retrieving from db. I'm going to bark up another tree now! Previous Comments: ------------------------------------------------------------------------ [2005-06-09 23:09:01] derick@php.net strtotime doesn't care about locales, and it won't work. Using the english name works fine here: <?php echo strtotime('24 May 2006 0:00'); ?> 1148421600 ------------------------------------------------------------------------ [2005-06-09 22:55:17] henke at mac dot se Only effects Swedish dates. i.e. '24 Maj 2006' ------------------------------------------------------------------------ [2005-06-09 22:45:07] henke at mac dot se Description: ------------ Using strtotime() funktion on dates between 2006-05-01 to 2006-05-30 always returns -1. This issue only affects May dates in 2006 which is weird. Reproduce code: --------------- strtotime('24 May 2006 0:00'); Tested only with swedish localisation so you could try setlocale(LC_TIME,'swedish'); strtotime('24 Maj 2006 0:00'); Expected result: ---------------- A unix timestamp Actual result: -------------- -1 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=33288&edit=1

« previous php.bugs (#80109) next »