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.
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.
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.
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.