views:

28

answers:

2

I tried

echo strtotime('129:00');

but it will have an empty output.

This echo strtotime('03:00');

will have 1288339200 as the output.

I guess strtotime() won't accept huge values?? What's the alternative for strtotime() that will accept 129:00.

+3  A: 

The alternative is to give strtotime() a time that actually means something. I know of no clocks that go up to 129 o'clock myself.

That's not to say there aren't any but I'm pretty old and I've traveled a bit. I'm sure I would have noticed something like this :-)

See the docs, which state:

The function expects to be given a string containing a US English date format

and end up pointing you here for valid time formats.

paxdiablo
129 o'clock would be 9am five days later, according to [Japanese thinking](http://en.wikipedia.org/wiki/Date_and_time_notation_by_country#Japan). There are no 144+ hour wall clocks here either though. ;)
deceze
+2  A: 

strtotime parses a date or a time (of the day, 24h clock) into UNIX timestamps. 129:00 is neither a date nor a time, so it returns false. It's not "too big", it's simply invalid input.

deceze