note 87090 added to function.strptime
| From: | Savageman at osu1 dot php dot net | Date: | Wed, 19 Nov 2008 03:07:04 +0000 |
| Subject: | note 87090 added to function.strptime | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-146688@lists.php.net to get a copy of this message | ||
Thanks for having rewrite strptime() on Windows. I just want to notice there is a problem (function
returns false) when the year is out of the range 1970-2038, because you are using mktime().
A very simple solution is to replace the "year" parameter by :
$aResult['tm_year']+1900-28*floor((($aResult['tm_year']-100)/28))
The desired result will be generated, as of days of the week are the same every 28 years.
----
Server IP: 89.31.146.176
Probable Submitter: 155.69.181.10
----
Manual Page -- http://www.php.net/manual/en/function.strptime.php
Edit -- https://master.php.net/note/edit/87090
Del: integrated -- https://master.php.net/note/delete/87090/integrated
Del: useless -- https://master.php.net/note/delete/87090/useless
Del: bad code -- https://master.php.net/note/delete/87090/bad+code
Del: spam -- https://master.php.net/note/delete/87090/spam
Del: non-english -- https://master.php.net/note/delete/87090/non-english
Del: in docs -- https://master.php.net/note/delete/87090/in+docs
Del: other reasons-- https://master.php.net/note/delete/87090
Reject -- https://master.php.net/note/reject/87090
Search -- https://master.php.net/manage/user-notes.php