|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-10-13 05:30 UTC] hholzgra@php.net
[2003-11-19 08:01 UTC] didou@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 20 09:00:02 2025 UTC |
Description: ------------ No matter what I do, strtotime can't seem to handle dates prior to 1970. The answer returned is always -1. The manual doesn't indicate this fact. Reproduce code: --------------- echo phpversion(); echo "\n------------------\n"; $time1="1/1/1970"; $time2="31-dec-1969"; $time3="31-dec-1949"; echo strtotime($time1); echo "\n"; echo strtotime($time2); echo "\n"; echo strtotime($time3); echo "\n"; Expected result: ---------------- 4.3.2 ----------------- 28800 -{some integer other than 1} -{some bigger integer other than 1} Actual result: -------------- 4.3.2 ------------------ 28800 -1 -1