I've used mktime() about a hundred thousand times (slight exaggeration). But, I'm having a crazy problem today.
PHP version is 4.3.11.
I have this code:
$blackoutstart = "6,55,51,6,30,06";
echo date("H:i:s, m/d/Y", mktime($blackoutstart));
Looks straightforward, no?
The minute and time (should be the second and third values passed to mktime(), right?) are coming back as the CURRENT time (according to the system clock) and NOT the value I'm passing, BUT ONLY MINUTES AND SECONDS! The rest of the values are computed correctly.
For example:
It's now 9:27:18 am CDT on 6/30/2006.
If I use the values in the example above, the code outputs
6:27:18, 6/30/2006
when it should be:
6:55:51, 6/30/2006
??
The problem started when I was just feeding mktime() two values (hour and minutes), and I was getting the same problem: only the hour would be set to the submitted value and the minutes would be set to the current system time.
Am I insane? Is my computer insane (I've tried it on two different machines)?
I know I'm doing something stupid, but I just can't see it.
Thanks!
Steven