#20382 [Com]: strtotime ("Monday", $date) can produce incorrect output
ID: 20382 Comment by: joe at dataport dot tv Reported By: nickj-phpbugs at nickj dot org Status: Assigned Bug Type: Date/time related Operating System: * PHP Version: 4CVS, 5CVS (2004-04-13) Assigned To: derick New Comment: Oh, also forgot to mention that while "next monday" does not work, "next tuesday" does. There's definately a bug here, if "this monday" works and "next tuesday" works, it seems to me that "next monday" should work as well and that it's not just some time zone issue. Previous Comments: ---------------- [2004-10-19 21:30:21] joe at dataport dot tv How's this? Outputs: 1 Outputs: 0 I was going to submit a seperate bug but this definately looks related even though this is a totally different way of going about getting the same type of problem. (I knew Mondays were a little odd, but does strtotime seem to think the sunday of the next week has an extra second after midnight? As this example demonstrates it doesn't do it if you prefix the weekday with "this", just "next" or no prefix at all.) [2004-04-08 10:13:10] [EMAIL PROTECTED] This one shows it better: [2004-04-08 07:15:26] nickj-phpbugs at nickj dot org How's this for a short and simple test script? Applies strtotime() to every day between 1970 and 2037, and gives a list of everything that looks wrong. == [2004-04-08 07:00:17] [EMAIL PROTECTED] I'm pretty sure the script is buggy. Please give us a test case for ONE date that is wrong, and comment your code properly too. [2004-04-08 04:25:55] [EMAIL PROTECTED] Can you please give a simpler test? (I somehow have a feeling your script is buggy, not PHP) The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/20382 -- Edit this bug report at http://bugs.php.net/?id=20382&edit=1
#20382 [Com]: strtotime ("Monday", $date) can produce incorrect output
ID: 20382 Comment by: joe at dataport dot tv Reported By: nickj-phpbugs at nickj dot org Status: Assigned Bug Type: Date/time related Operating System: * PHP Version: 4CVS, 5CVS (2004-04-13) Assigned To: derick New Comment: How's this? Outputs: 1 Outputs: 0 I was going to submit a seperate bug but this definately looks related even though this is a totally different way of going about getting the same type of problem. (I knew Mondays were a little odd, but does strtotime seem to think the sunday of the next week has an extra second after midnight? As this example demonstrates it doesn't do it if you prefix the weekday with "this", just "next" or no prefix at all.) Previous Comments: [2004-04-08 10:13:10] [EMAIL PROTECTED] This one shows it better: [2004-04-08 07:15:26] nickj-phpbugs at nickj dot org How's this for a short and simple test script? Applies strtotime() to every day between 1970 and 2037, and gives a list of everything that looks wrong. == [2004-04-08 07:00:17] [EMAIL PROTECTED] I'm pretty sure the script is buggy. Please give us a test case for ONE date that is wrong, and comment your code properly too. [2004-04-08 04:25:55] [EMAIL PROTECTED] Can you please give a simpler test? (I somehow have a feeling your script is buggy, not PHP) [2003-04-06 18:47:03] scottmacvicar at ntlworld dot com This is a DST problem by the looks of it. The specific dates mentioned are when DST takes effect which is the last sunday in March. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/20382 -- Edit this bug report at http://bugs.php.net/?id=20382&edit=1