How to calculate the date of next Monday in PHP? -


i'm trying date comes next monday @ night 00:01 am. i'm using following lines:

date('y-m-d h:i:s', strtotime(**'next monday, 01:01am'**, strtotime(date("y-m-d h:i:s")))) 

this gives me proper output:

2014-05-19 01:01:00

but if try write:

date('y-m-d h:i:s', strtotime(**'next monday, 00:01am'**, strtotime(date("y-m-d h:i:s")))) 

i'm getting:

1970-01-01 05:30:00

please tell me wrong here.

00:01 am not correct use 12:01 am

try this:

date('y-m-d h:i:s', strtotime('next monday, 12:01am', strtotime(date("y-m-d h:i:s")))); 

it give 2014-05-19 12:01:00

demo


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -