8.4.2 How to show 'tomorrow 09:00:00' as user datetime in widget?

Permalink
$dt = new DateTime('tomorrow 09:00:00');
echo $app->make('helper/form/date_time')->datetime('dt', $dt, false, true, null, 1800, array());

shows the correct date and time only if the system server time is the same as the user's, e.g. localhost. But if the server and user are in different time zones, the $dt at the user end is no longer that.

I also tried:
$dt = $dh->formatDateTime(date("Y/m/d H:i:s"), false, false, 'user');

which shows the current user date and time, but as soon as I change anything in there (like adding a day or time or anything, it goes back to the server's datetime).

For example, the above shows today's 17/08/18 1:00 (correct user time now), but
$dt = $dh->formatDateTime(date("Y/m/d H:i:s", strtotime("tomorrow 9:00")), false, false, 'user');

shows 18/08/18 1:00 which is 9:00 - 10 h for time zone = server time.

How can I show that exact date and time (tomorrow 9:00) as the user's, not as the system's?

linuxoid
 
linuxoid replied on at Permalink Reply
linuxoid
Anyone?
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
This might point you in the right direction..
https://stackoverflow.com/questions/4746249/get-user-timezone...