3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $timezone = new \DateTimeZone('Europe/London'); $datetime = new \DateTime(); $datetime->setTimezone($timezone); echo $datetime->format('Y-m-d H:i:s');
based on QjcJM
Output for 7.0.20 - 7.2.0
2015-10-05 20:14:56
Output for 7.0.6
2016-05-03 08:21:42
Output for 7.0.5
2016-04-02 21:14:45
Output for 7.0.4
2016-03-10 07:43:45
Output for 7.0.3
2016-03-18 08:20:25
Output for 7.0.2
2016-03-22 14:14:09
Output for 7.0.1
2016-03-23 19:01:40
Output for 7.0.0
2016-03-26 20:35:11
Output for 5.6.21
2016-05-02 03:42:43
Output for 5.6.20
2016-04-09 20:10:52
Output for 5.6.19
2016-03-07 15:52:18
Output for 5.6.18
2016-03-14 23:45:18
Output for 5.6.17
2016-03-19 12:36:40
Output for 5.6.16
2016-03-27 22:20:34
Output for 5.6.15
2016-03-28 23:14:01
Output for 5.6.14
2016-04-02 01:47:06
Output for 5.6.13
2016-04-15 05:41:34
Output for 5.6.12
2016-04-19 19:24:26
Output for 5.6.11
2016-04-23 02:29:23
Output for 5.6.10
2016-04-25 04:12:43
Output for 5.6.9
2016-04-27 09:10:39
Output for 5.6.8
2016-04-29 17:15:02
Output for 5.5.35
2016-05-22 07:27:11
Output for 5.5.34
2016-04-10 22:31:39
Output for 5.5.33
2016-03-08 18:48:31
Output for 5.5.32
2016-03-17 01:29:16
Output for 5.5.31
2016-03-20 15:22:33
Output for 5.5.30
2016-04-01 01:21:31
Output for 5.5.29
2016-04-16 19:46:32
Output for 5.5.28
2016-04-20 22:30:05
Output for 5.5.27
2016-04-22 00:59:19
Output for 5.5.26
2016-04-26 06:39:40
Output for 5.5.25
2016-04-28 12:56:57
Output for 5.5.24
2016-05-23 19:59:45
Output for 5.4.39 - 5.4.45
2015-10-05 20:15:06
Output for 5.4.31 - 5.4.38
2015-10-05 20:15:07
Output for 5.4.23 - 5.4.30
2015-10-05 20:15:08
Output for 5.4.16 - 5.4.22
2015-10-05 20:15:09
Output for 5.4.9 - 5.4.15
2015-10-05 20:15:10
Output for 5.4.8
2015-10-05 20:15:11
Output for 5.4.7
2015-10-27 00:53:49
Output for 5.4.6
2015-10-27 02:22:29
Output for 5.4.5
2015-10-27 03:52:50
Output for 5.4.4
2015-10-27 05:28:42
Output for 5.4.3
2015-10-27 07:10:16
Output for 5.4.2
2015-10-27 08:55:41
Output for 5.3.29
2015-10-31 04:39:34
Output for 5.3.28
2015-10-31 06:47:45
Output for 5.3.27
2015-10-31 08:55:46
Output for 5.3.26
2015-11-02 07:52:08
Output for 5.3.25
2015-11-02 09:34:38
Output for 5.3.24
2015-11-02 10:47:21
Output for 5.3.23
2015-11-02 12:17:05
Output for 5.3.22
2015-11-02 13:48:12
Output for 5.3.21
2015-11-02 14:55:17
Output for 5.3.20
2015-11-02 15:53:45
Output for 5.3.19
2015-11-02 17:20:46
Output for 5.3.18
2015-11-02 18:11:14