![]() Topic awaiting preservation: strtotime() sporadic? (Page 1 of 1) |
|
---|---|
Paranoid (IV) Inmate From: 1393 |
![]() 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 |
![]() |
Paranoid (IV) Inmate From: 1393 |
![]() 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 |
![]() 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 |
![]() quote:
|