-2

I am looking for a simple way to get a timestamp relative to today, but at a specific time.

Example: Right now is 07-01-2020 10:00 a.m. Result: Time stamp of 06.07.2020 0 o'clock

Only that the values of today are varbiale. Is there a good possibility with strtotime()?

1 Answers1

1

I have found a solution, perhaps not the best.

$newdate = date('Y-m-d H:i:s', strtotime('+ 5 days 2 hours',strtotime('today midnight')));```