3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $now = new DateTime(); var_dump($now->format('H:i:s')); $now->setTimezone(new DateTimeZone('Europe/London')); var_dump($now->format('H:i:s'));
based on C6tPg
Output for 5.6.28, 7.0.20 - 7.2.0
string(8) "15:28:35" string(8) "14:28:35"
Output for 7.0.6
string(8) "08:19:52" string(8) "07:19:52"
Output for 7.0.5
string(8) "21:16:24" string(8) "20:16:24"
Output for 7.0.4
string(8) "07:35:09" string(8) "06:35:09"
Output for 7.0.3
string(8) "08:08:18" string(8) "07:08:18"
Output for 7.0.2
string(8) "13:53:35" string(8) "12:53:35"
Output for 7.0.1
string(8) "18:55:57" string(8) "17:55:57"
Output for 7.0.0
string(8) "20:32:58" string(8) "19:32:58"
Output for 5.6.21
string(8) "03:39:45" string(8) "02:39:45"
Output for 5.6.20
string(8) "20:09:02" string(8) "19:09:02"
Output for 5.6.19
string(8) "15:42:12" string(8) "14:42:12"
Output for 5.6.18
string(8) "23:28:08" string(8) "22:28:08"
Output for 5.6.17
string(8) "12:26:35" string(8) "11:26:35"
Output for 5.6.16
string(8) "22:18:52" string(8) "21:18:52"
Output for 5.6.15
string(8) "23:11:48" string(8) "22:11:48"
Output for 5.6.14
string(8) "01:45:39" string(8) "00:45:39"
Output for 5.6.13
string(8) "05:41:07" string(8) "04:41:07"
Output for 5.6.12
string(8) "19:19:08" string(8) "18:19:08"
Output for 5.6.11
string(8) "02:19:39" string(8) "01:19:39"
Output for 5.6.10
string(8) "04:09:07" string(8) "03:09:07"
Output for 5.6.9
string(8) "09:06:34" string(8) "08:06:34"
Output for 5.6.8
string(8) "17:07:44" string(8) "16:07:44"
Output for 5.6.7
string(8) "11:49:03" string(8) "10:49:03"
Output for 5.5.35
string(8) "07:21:41" string(8) "06:21:41"
Output for 5.5.34
string(8) "22:33:01" string(8) "21:33:01"
Output for 5.5.33
string(8) "18:31:19" string(8) "17:31:19"
Output for 5.5.32
string(8) "01:19:23" string(8) "00:19:23"
Output for 5.5.31
string(8) "15:13:17" string(8) "14:13:17"
Output for 5.5.30
string(8) "01:19:55" string(8) "00:19:55"
Output for 5.5.29
string(8) "19:46:13" string(8) "18:46:13"
Output for 5.5.28
string(8) "22:24:54" string(8) "21:24:54"
Output for 5.5.27
string(8) "00:55:43" string(8) "23:55:43"
Output for 5.5.26
string(8) "06:34:58" string(8) "05:34:58"
Output for 5.5.25
string(8) "12:38:23" string(8) "11:38:23"
Output for 5.5.24
string(8) "19:34:26" string(8) "18:34:26"
Output for 5.4.38 - 5.4.45
string(8) "15:28:41" string(8) "14:28:41"
Output for 5.4.26 - 5.4.37
string(8) "15:28:42" string(8) "14:28:42"
Output for 5.4.15 - 5.4.25
string(8) "15:28:43" string(8) "14:28:43"
Output for 5.4.8 - 5.4.14
string(8) "15:28:44" string(8) "14:28:44"
Output for 5.4.7
string(8) "01:51:07" string(8) "00:51:07"
Output for 5.4.6
string(8) "03:16:43" string(8) "02:16:43"
Output for 5.4.5
string(8) "04:47:27" string(8) "03:47:27"
Output for 5.4.4
string(8) "06:22:34" string(8) "05:22:34"
Output for 5.4.3
string(8) "08:04:01" string(8) "07:04:01"
Output for 5.4.2
string(8) "09:49:24" string(8) "08:49:24"
Output for 5.3.29
string(8) "05:30:35" string(8) "04:30:35"
Output for 5.3.28
string(8) "07:38:25" string(8) "06:38:25"
Output for 5.3.27
string(8) "09:46:54" string(8) "08:46:54"
Output for 5.3.26
string(8) "08:43:21" string(8) "07:43:21"
Output for 5.3.25
string(8) "10:26:02" string(8) "09:26:02"
Output for 5.3.24
string(8) "11:44:14" string(8) "10:44:14"
Output for 5.3.23
string(8) "13:08:33" string(8) "12:08:33"
Output for 5.3.22
string(8) "14:39:24" string(8) "13:39:24"
Output for 5.3.21
string(8) "15:52:01" string(8) "14:52:01"
Output for 5.3.20
string(8) "16:50:10" string(8) "15:50:10"
Output for 5.3.19
string(8) "18:17:44" string(8) "17:17:44"
Output for 5.3.18
string(8) "19:08:33" string(8) "18:08:33"