3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $time = new DateTime('now', new Datetimezone('Europe/Kiev')); echo $time->format('c') . "\n"; $timestamp = $time->setTimezone(new DateTimezone('UTC'))->format('U'); echo $timestamp . "\n"; echo (new DateTime('@' . $timestamp, new DateTimezone('Europe/Kiev')))->format('c') . "\n"; echo (new DateTime('@' . $timestamp, new DateTimezone('Europe/Moscow')))->format('c') . "\n";
based on VQXl1
Output for 5.6.28, 7.0.20 - 7.3.0beta1
2016-03-11T14:44:00+02:00 1457700240 2016-03-11T12:44:00+00:00 2016-03-11T12:44:00+00:00
Output for 7.0.6
2016-05-21T18:06:47+03:00 1463843207 2016-05-21T15:06:47+00:00 2016-05-21T15:06:47+00:00
Output for 7.0.5
2016-04-14T15:33:30+03:00 1460637210 2016-04-14T12:33:30+00:00 2016-04-14T12:33:30+00:00
Output for 5.5.33, 5.6.19, 7.0.4
2016-03-11T14:44:02+02:00 1457700242 2016-03-11T12:44:02+00:00 2016-03-11T12:44:02+00:00
Output for 5.5.31 - 5.5.32, 5.6.17 - 5.6.18, 7.0.1 - 7.0.3
2016-03-11T14:44:03+02:00 1457700243 2016-03-11T12:44:03+00:00 2016-03-11T12:44:03+00:00
Output for 5.5.30, 5.6.15 - 5.6.16, 7.0.0
2016-03-11T14:44:04+02:00 1457700244 2016-03-11T12:44:04+00:00 2016-03-11T12:44:04+00:00
Output for 5.6.21
2016-05-02T20:32:07+03:00 1462210327 2016-05-02T17:32:07+00:00 2016-05-02T17:32:07+00:00
Output for 5.6.20
2016-04-10T12:35:56+03:00 1460280956 2016-04-10T09:35:56+00:00 2016-04-10T09:35:56+00:00
Output for 5.5.28 - 5.5.29, 5.6.12 - 5.6.14
2016-03-11T14:44:05+02:00 1457700245 2016-03-11T12:44:05+00:00 2016-03-11T12:44:05+00:00
Output for 5.5.26 - 5.5.27, 5.6.9 - 5.6.11
2016-03-11T14:44:06+02:00 1457700246 2016-03-11T12:44:06+00:00 2016-03-11T12:44:06+00:00
Output for 5.5.23 - 5.5.25, 5.6.7 - 5.6.8
2016-03-11T14:44:07+02:00 1457700247 2016-03-11T12:44:07+00:00 2016-03-11T12:44:07+00:00
Output for 5.5.18 - 5.5.22, 5.6.1 - 5.6.6
2016-03-11T14:44:08+02:00 1457700248 2016-03-11T12:44:08+00:00 2016-03-11T12:44:08+00:00
Output for 5.5.10 - 5.5.16, 5.6.0
2016-03-11T14:44:09+02:00 1457700249 2016-03-11T12:44:09+00:00 2016-03-11T12:44:09+00:00
Output for 5.5.35
2016-05-23T08:47:34+03:00 1463982454 2016-05-23T05:47:34+00:00 2016-05-23T05:47:34+00:00
Output for 5.5.34
2016-04-11T14:49:39+03:00 1460375379 2016-04-11T11:49:39+00:00 2016-04-11T11:49:39+00:00
Output for 5.5.2 - 5.5.9
2016-03-11T14:44:10+02:00 1457700250 2016-03-11T12:44:10+00:00 2016-03-11T12:44:10+00:00
Output for 5.5.0 - 5.5.1
2016-03-11T14:44:11+02:00 1457700251 2016-03-11T12:44:11+00:00 2016-03-11T12:44:11+00:00