3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php date_default_timezone_set('EET'); $date = new DateTime(); var_dump($date); $date->setTimezone(new DateTimeZone('EET')); var_dump($date);
Output for 7.1.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-04-15 21:17:51.006300" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2014-04-15 20:17:51.006300" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EET" }
Output for 5.6.28, 7.0.14
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-04-15 21:17:51.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2014-04-15 20:17:51.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EET" }
Output for 7.0.6
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-03 05:54:59.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-03 04:54:59.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EET" }
Output for 7.0.5
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-02 19:03:54.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-02 18:03:54.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EET" }
Output for 7.0.4
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-10 04:52:52.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-10 04:52:52.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EET" }
Output for 7.0.3
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-18 05:11:50.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-18 05:11:50.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EET" }
Output for 7.0.2
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-21 15:40:16.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-21 15:40:16.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EET" }
Output for 7.0.1
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-23 16:18:25.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-23 16:18:25.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EET" }
Output for 7.0.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-26 18:09:46.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-26 18:09:46.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EET" }
Output for hhvm-3.12.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-11 11:41:08.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-11 11:41:08.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" }
Output for hhvm-3.10.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-30 01:25:47.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-30 01:25:47.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" }
Output for 5.6.21
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-02 00:58:13.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-01 23:58:13.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EET" }
Output for 5.6.20
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-09 14:18:34.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-09 13:18:34.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EET" }
Output for 5.6.19
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-07 04:17:28.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-07 04:17:28.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EET" }
Output for 5.6.18
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-14 17:46:46.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-14 17:46:46.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EET" }
Output for 5.6.17
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-19 09:37:07.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-19 09:37:07.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EET" }
Output for 5.6.16
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-27 19:55:28.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-27 18:55:28.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EET" }
Output for 5.6.15
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-28 20:47:50.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-28 19:47:50.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EET" }
Output for 5.6.14
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-01 23:21:14.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-01 22:21:14.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EET" }
Output for 5.6.13
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-15 03:20:53.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-15 02:20:53.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EET" }
Output for 5.6.12
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-19 16:36:28.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-19 15:36:28.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EET" }
Output for 5.6.11
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-22 23:45:07.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-22 22:45:07.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EET" }
Output for 5.6.10
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-25 01:23:32.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-25 00:23:32.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EET" }
Output for 5.6.9
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-27 06:36:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-27 05:36:00.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EET" }
Output for 5.6.8
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-29 14:23:43.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-29 13:23:43.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EET" }
Output for 5.5.35
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-22 04:42:26.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-22 03:42:26.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EET" }
Output for 5.5.34
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-10 20:16:05.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-10 19:16:05.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EET" }
Output for 5.5.33
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-08 15:47:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-08 15:47:23.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EET" }
Output for 5.5.32
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-16 21:37:17.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-16 21:37:17.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EET" }
Output for 5.5.31
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-20 12:28:53.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-20 12:28:53.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EET" }
Output for 5.5.30
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-31 22:48:52.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-31 21:48:52.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EET" }
Output for 5.5.29
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-16 17:25:16.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-16 16:25:16.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EET" }
Output for 5.5.28
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-20 19:48:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-20 18:48:00.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EET" }
Output for 5.5.27
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-21 22:11:20.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-21 21:11:20.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EET" }
Output for 5.5.26
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-26 03:56:14.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-26 02:56:14.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EET" }
Output for 5.5.25
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-28 09:54:54.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-28 08:54:54.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EET" }
Output for 5.5.24
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-24 15:56:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-24 14:56:00.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EET" }
Output for 5.4.45
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-09-09 01:07:45.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2015-09-09 01:07:45.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "Europe/Helsinki" }
Output for 5.4.44
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-08-22 06:03:17.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2015-08-22 06:03:17.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "Europe/Helsinki" }
Output for 5.4.43
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-08-22 06:03:14.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2015-08-22 06:03:14.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "Europe/Helsinki" }
Output for 5.4.42
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-08-22 06:03:12.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2015-08-22 06:03:12.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "Europe/Helsinki" }
Output for 5.4.41
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-08-22 06:03:09.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2015-08-22 06:03:09.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "Europe/Helsinki" }
Output for 5.4.40
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-08-22 06:03:05.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2015-08-22 06:03:05.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "Europe/Helsinki" }
Output for 5.4.39
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-08-22 06:03:04.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2015-08-22 06:03:04.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "Europe/Helsinki" }
Output for 5.4.38
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-03-14 17:51:33.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2015-03-14 17:51:33.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "Europe/Helsinki" }
Output for 5.4.36 - 5.4.37
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-03-14 17:51:26.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2015-03-14 17:51:26.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "Europe/Helsinki" }
Output for 5.4.34 - 5.4.35
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-03-14 17:51:25.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2015-03-14 17:51:25.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "Europe/Helsinki" }
Output for 5.4.32
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-08-30 08:48:46.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2014-08-30 08:48:46.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "Europe/Helsinki" }
Output for 5.4.31
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-08-30 08:48:43.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2014-08-30 08:48:43.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "Europe/Helsinki" }
Output for 5.4.30
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-08-30 08:48:40.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(26) "2014-08-30 08:48:40.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "Europe/Helsinki" }
Output for 5.4.28 - 5.4.29
object(DateTime)#1 (3) { ["date"]=> string(19) "2014-08-30 08:48:39" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(19) "2014-08-30 08:48:39" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "Europe/Helsinki" }
Output for 5.4.9 - 5.4.27
object(DateTime)#1 (3) { ["date"]=> string(19) "2014-04-15 21:17:52" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(19) "2014-04-15 21:17:52" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "Europe/Helsinki" }
Output for 5.3.17 - 5.3.28, 5.4.0 - 5.4.8
object(DateTime)#1 (3) { ["date"]=> string(19) "2014-04-15 21:17:53" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(19) "2014-04-15 21:17:53" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "Europe/Helsinki" }
Output for 5.3.29
object(DateTime)#1 (3) { ["date"]=> string(19) "2014-08-30 08:48:40" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(19) "2014-08-30 08:48:40" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "Europe/Helsinki" }
Output for 5.3.0 - 5.3.16
object(DateTime)#1 (3) { ["date"]=> string(19) "2014-04-15 21:17:54" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "EET" } object(DateTime)#1 (3) { ["date"]=> string(19) "2014-04-15 21:17:54" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "Europe/Helsinki" }
Output for 5.2.0 - 5.2.17
object(DateTime)#1 (0) { } object(DateTime)#1 (0) { }
Output for 5.1.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/1IcMK on line 3
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Fatal error: Call to undefined function date_default_timezone_set() in /in/1IcMK on line 2
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: date_default_timezone_set() in /in/1IcMK on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: date_default_timezone_set() in /in/1IcMK on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: date_default_timezone_set() in /in/1IcMK on line 2