1

Topic: Operation with timezone

I store in basis time in utc, at the user offset in hours is stored
I display so

$this-> timezoneName = timezone_name_from_abbr ("", $offset * 3600, 0);
$d = new \DateTime ($date, new \DateTimeZone (' UTC '));
$d-> setTimezone (new \DateTimeZone ($this-> timezoneName));

And so for all offsets works normally except $offset=10
Time  not +10 and +11 here an example https://3v4l.org/6TFdF
How it ?

2

Re: Operation with timezone

tadeyiloda;
Google: Sunday, on December, 4th, 2016 (GMT+11)
Canberra the Australian capital territory, Australia

3

Re: Operation with timezone

timezone_name_from_abbr ("", 10 * 3600, 0);

Why if I specify offset 10 that  Australia/Melbourne with offset +11?