Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004064 [Quercus] minor always 06-02-10 03:34 12-20-10 10:34
Reporter hm2k View Status public  
Assigned To
Priority normal Resolution open  
Status new   Product Version 4.0.7
Summary 0004064: strtodate does not work correctly
Description <?php

echo date('d-M-Y',strtotime('2009/07/14'));
//expected 14-Jul-2009, gave 07-May-2014

echo date('d-M-Y',strtotime('14-Aug-2009'));
//expected 14-Aug-2009, gave 30-Jan-2016

?>
Additional Information @see http://php.net/strtotime [^]
@see http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/strtotime.phpt?view=co [^]
@see http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/strtotime_basic.phpt?view=co [^]
@see http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/strtotime_basic2.phpt?view=co [^]
@see http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/strtotime2.phpt?view=co [^]
@see http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/strtotime3.phpt?view=co [^]
Attached Files

- Relationships

- Notes
(0004627)
sblommers
06-02-10 05:36

Hi, this was already reported and fixed in version 4.0.8 but is not yet released. It is in SVN and I tested it and it works. (see forum).
 
(0004629)
hm2k
06-02-10 12:36

I was unable to locate this on the forums.

I had tried to report it on the forums, but it never appeared.
 
(0004632)
sblommers
06-04-10 06:21

This bug is *NOT* fixed, I was confused with another bug sorry.
 
(0004884)
gbruins
12-20-10 10:34

Requesting that the severity of this issue be raised to "Major", as I think strtotime() is a commonly used PHP function.

strtotime("today") returns the same value as strtotime("now"), which is not correct.

Also, passing a date in ISO-8601 format is really broken. Here are some code examples:


Quercus (resin 4.0.10) results:
================================
echo strtotime("2010-11-30T23:59:59.000-08:00");
echo("\n");
echo strtotime("today");
echo("\n");
echo strtotime("now");

Displays:
5647337791081199
1292869801
1292869801


Expected results:
============================
1291190399
1292832000
1292869801
 

- Issue History
Date Modified Username Field Change
06-02-10 03:34 hm2k New Issue
06-02-10 05:36 sblommers Note Added: 0004627
06-02-10 12:36 hm2k Note Added: 0004629
06-04-10 06:21 sblommers Note Added: 0004632
06-04-10 08:02 sblommers Issue Monitored: sblommers
12-20-10 10:34 gbruins Note Added: 0004884


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
37 total queries executed.
30 unique queries executed.
Powered by Mantis Bugtracker