3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(new \DateTime(null, new \DateTimeZone('America/Adak'))); var_dump(new \DateTime(null, new \DateTimeZone('America/New_York')));
based on Z1pst
Output for 7.2.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 09:08:27.003961" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 14:08:27.004038" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 7.1.10
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 09:08:27.003549" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 14:08:27.003625" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 7.1.7
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 09:08:27.002802" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 14:08:27.002858" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 7.1.6
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 09:08:27.012011" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 14:08:27.012153" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 7.1.5
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 09:08:27.009792" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 14:08:27.009912" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 7.1.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 09:08:27.004165" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 14:08:27.004254" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.6.28, 7.0.20
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 09:08:27.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 14:08:27.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 7.0.6
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-21 02:42:28.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-21 07:42:28.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 7.0.5
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-02 22:41:12.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-03 03:41:12.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 7.0.4
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-10 10:48:05.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-10 15:48:05.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 7.0.3
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-18 13:14:47.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-18 18:14:47.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 7.0.2
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-22 19:28:10.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-23 00:28:10.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 7.0.1
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-23 22:32:54.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-24 03:32:54.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 7.0.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-26 23:26:03.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-27 04:26:03.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.6.21
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-02 05:35:05.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-02 10:35:05.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.6.20
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-09 21:43:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-10 02:43:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.6.19
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-07 18:57:21.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-07 23:57:21.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.6.18
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-15 04:55:18.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-15 09:55:18.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.6.17
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-19 16:27:54.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-19 21:27:54.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.6.16
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-28 00:15:43.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-28 05:15:43.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.6.15
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-29 01:05:19.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-29 06:05:19.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.6.14
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-14 06:47:49.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-14 11:47:49.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.6.13
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-15 07:26:43.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-15 12:26:43.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.6.12
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-19 21:56:06.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-20 02:56:06.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.6.11
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-24 04:22:31.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-24 09:22:31.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.6.10
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-25 06:28:12.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-25 11:28:12.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.6.9
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-27 11:54:30.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-27 16:54:30.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.6.8
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-29 20:23:33.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-30 01:23:33.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.5.35
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-22 15:37:39.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-22 20:37:39.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.5.34
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-10 23:57:13.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-11 04:57:13.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.5.33
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-08 21:56:22.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-09 02:56:22.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.5.32
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-17 08:53:02.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-17 13:53:02.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.5.31
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-20 19:38:52.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-21 00:38:52.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.5.30
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-01 02:56:40.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-01 07:56:40.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.5.29
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-16 21:44:24.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-17 02:44:24.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.5.28
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-21 01:15:49.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-21 06:15:49.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.5.27
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-22 02:52:59.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-22 07:52:59.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.5.26
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-26 09:09:35.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-26 14:09:35.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.5.25
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-28 16:35:22.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-28 21:35:22.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.5.24
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-23 22:58:36.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-24 03:58:36.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.4.45
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 09:08:30.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 14:08:30.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.4.44
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 09:08:31.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 14:08:31.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.4.42 - 5.4.43
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 09:08:32.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 14:08:32.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.4.40 - 5.4.41
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 09:08:33.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 14:08:33.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.4.38 - 5.4.39
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 09:08:34.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 14:08:34.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.4.35 - 5.4.37
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 09:08:35.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 14:08:35.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.4.32 - 5.4.34
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 09:08:36.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 14:08:36.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.4.30 - 5.4.31
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 09:08:37.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 14:08:37.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.3.29, 5.4.28 - 5.4.29
object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-12 09:08:37" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-12 14:08:37" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.4.25 - 5.4.27
object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-12 09:08:38" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-12 14:08:38" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.3.28, 5.4.21 - 5.4.24
object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-12 09:08:39" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-12 14:08:39" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.4.18 - 5.4.20
object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-12 09:08:40" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-12 14:08:40" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.3.26 - 5.3.27, 5.4.15 - 5.4.17
object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-12 09:08:41" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-12 14:08:41" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.3.21 - 5.3.25, 5.4.12 - 5.4.14
object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-12 09:08:42" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-12 14:08:42" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.4.11
object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-12 09:08:43" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "America/Adak" } object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-12 14:08:43" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }