Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a difference between Europe/London and UTC in PHP? [closed]

I know that UTC and GMT are effectively the same thing.

BST (British Standard Time) is GMT +- 1 hour depending on DST (Daylight Saving Time).

With that in mind, how is Europe/London interpreted in PHP? Is it basically UTC/GMT?

like image 367
Chris Rosillo Avatar asked Jun 03 '13 15:06

Chris Rosillo


People also ask

Is Europe London GMT?

London uses Greenwich Mean Time (GMT) during standard time and British Summer Time (BST) during Daylight Saving Time (DST), or summer time.

Is Europe London the same as UTC?

The United Kingdom uses Greenwich Mean Time or Western European Time (UTC) and British Summer Time or Western European Summer Time (UTC+01:00).


1 Answers

how is Europe/London interpreted in PHP? Is it basically UTC/GMT?

They are not the same (UTC/GMT has no daylight savings). As of this writing they are an hour apart:

$utc = new DateTime('now', new DateTimeZone('UTC'));
echo $utc->format('Y-m-d H:i:s'); // output: 2013-06-03 15:37:08

$el = new DateTime('now', new DateTimeZone('Europe/London'));
echo $el->format('Y-m-d H:i:s'); //  output: 2013-06-03 16:37:08
like image 95
webbiedave Avatar answered Oct 17 '22 08:10

webbiedave