Topic awaiting preservation: strtotime() sporadic? |
|
---|---|
Author | Thread |
Paranoid (IV) Inmate From: 1393 |
posted 11-12-2008 16:54
Hey all, code: $date = strtotime("+17 hours", strtotime(date("Y-m-d h:i:s"))); echo date("Y-m-d", $date); ....would not display the next days date. I finally gave up on it for the night, then to my surprise found that it is working this morning (without any change). I'm more used to mktime and have just recently started playing around with strtotime, I wonder am I missing something? |
Maniac (V) Mad Scientist From: Denver, CO, USA |
posted 11-12-2008 18:02 |
Paranoid (IV) Inmate From: 1393 |
posted 11-12-2008 19:48
Right, code: date("Y-m-d h:i:s") Could be any date... and code: "+17 hours" could be any number of hours. |
Maniac (V) Mad Scientist From: Denver, CO, USA |
posted 11-12-2008 22:46
Well, I've never had any sporadic behavior. Just so long as you're aware +17 hours won't return tomorrow's date all the time. |
Paranoid (IV) Inmate From: 1393 |
posted 11-14-2008 20:31
quote:
|