3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(new \DateTime(null, new \DateTimeZone('America/Toronto'))); var_dump(new \DateTime(null, new \DateTimeZone('America/New_York')));
based on UDOHR
Output for 7.2.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 14:01:35.003907" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 14:01:35.003967" ["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 14:01:35.003234" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 14:01:35.003305" ["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 14:01:35.002400" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 14:01:35.002451" ["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 14:01:35.012542" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 14:01:35.012683" ["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 14:01:35.010690" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 14:01:35.010826" ["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 14:01:35.004168" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 14:01:35.004277" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 7.0.20
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 14:01:35.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 14:01:35.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 07:42:17.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-21 07:42:17.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-03 03:41:04.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-03 03:41:04.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 15:47:56.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-10 15:47:56.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 18:14:36.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-18 18:14:36.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-23 00:28:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-23 00:28:00.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-24 03:32:44.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-24 03:32:44.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-27 04:25:54.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-27 04:25:54.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 10:34:56.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-02 10:34:56.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-10 02:43:13.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-10 02:43:13.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 23:57:11.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-07 23:57:11.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 09:55:08.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-15 09:55:08.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 21:27:43.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-19 21:27:43.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 05:15:34.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-28 05:15:34.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 06:05:09.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-29 06:05:09.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 11:47:40.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-14 11:47:40.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 12:26:34.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-15 12:26:34.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-20 02:55:58.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-20 02:55:58.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 09:22:21.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-24 09:22:21.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 11:28:04.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-25 11:28:04.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 16:54:20.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-27 16:54:20.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-30 01:23:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-30 01:23:23.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 20:37:28.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-22 20:37:28.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-11 04:57:04.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-11 04:57:04.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-09 02:56:12.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-09 02:56:12.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 13:52:50.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-17 13:52:50.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-21 00:38:41.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-21 00:38:41.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 07:56:31.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-01 07:56:31.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-17 02:44:15.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-17 02:44:15.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 06:15:39.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-21 06:15:39.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 07:52:49.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-22 07:52:49.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 14:09:26.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-26 14:09:26.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 21:35:12.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-28 21:35:12.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-24 03:58:26.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-24 03:58:26.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 14:01:37.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 14:01:37.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.4.43 - 5.4.44
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 14:01:38.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 14:01:38.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.4.41 - 5.4.42
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 14:01:39.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 14:01:39.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.4.39 - 5.4.40
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 14:01:40.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 14:01:40.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.4.37 - 5.4.38
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 14:01:41.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 14:01:41.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.4.34 - 5.4.36
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 14:01:42.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 14:01:42.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.4.31 - 5.4.32
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 14:01:43.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 14:01:43.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.4.30
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 14:01:44.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(26) "2016-01-12 14:01:44.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.4.28 - 5.4.29
object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-12 14:01:44" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-12 14:01:44" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.4.24 - 5.4.27
object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-12 14:01:45" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-12 14:01:45" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.3.28, 5.4.20 - 5.4.23
object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-12 14:01:46" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-12 14:01:46" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.4.18 - 5.4.19
object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-12 14:01:47" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-12 14:01:47" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.3.26 - 5.3.27, 5.4.16 - 5.4.17
object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-12 14:01:48" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-12 14:01:48" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.3.24 - 5.3.25, 5.4.14 - 5.4.15
object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-12 14:01:49" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-12 14:01:49" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.3.21 - 5.3.23, 5.4.12 - 5.4.13
object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-12 14:01:50" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-12 14:01:50" ["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 14:01:51" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-12 14:01:51" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }
Output for 5.3.29
object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-12 14:01:43" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "America/Toronto" } object(DateTime)#1 (3) { ["date"]=> string(19) "2016-01-12 14:01:43" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "America/New_York" }