On Nov 17, 2011, at 11:58 AM, Stuart Dallas wrote: > The epoch specifies the exact time that 0 represents. It makes no claims as > far as that being the start of anything... > > "defined as the number of seconds elapsed since midnight Coordinated > Universal Time (UTC) of Thursday, January 1, 1970 (Unix times are defined, > but negative, before that date)" [http://en.wikipedia.org/wiki/Unix_time]
Good reference to support your point, but strtotime() doesn't qork that way. In addition, the statement does not address where the fractions of a second were that occurred before the completion of the first second, clearly those fractions occurred in 1970. >> For example, if you push '-1' though strtotime(-1), you'll get Wednesday >> only one day a week -- whereas 'null' works every time. > Technically I see that as a bug. I believe strtotime(null) should return > null, but due to the way type inference works, null is interpreted as 0. The > point here being that you're not getting the time at null, you're getting the > time at 0. Nope, zero time is absolutely January 1, 1970 00:00:00 -- which was a Thursday. If you pass zero through strtotime(), it reports "December 1969" and I claim that to be a bug. Realize that seconds, minutes, and hours go from 0-59, not 1 to 60. Any fractions of a second before zero was 59.999... and such was indeed part of the day/month/year before. In addition, passing -1 through strtotime() simply returns today, whereas 'null' returns a date prior to the start of everything and that makes more logical sense to me. >> My point stands: null == Wednesday. :-) > > It may stand, but it's standing on foundations of null space :) Been there many times. :-) Cheers, tedd _____________________ t...@sperling.com http://sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php