On Mon, 3 Sep 2012, Will Fitch wrote:

> On Mon, Sep 3, 2012 at 8:09 AM, Lars Strojny <l...@strojny.net> wrote:
> 
> > Additionally to what Ryan proposed, microseconds should be part of it
> > (which ISO allows). So, here we go:
> >
> >   2012-09-02T18:17:36.12345+0100 (Europe/London)
> 
> Hi Lars - there wouldn't be a need for the offset if the string 
> provides the timezone name.

And you are wrong again:

<?php
$d = date_create( "@1351385100" );
$d->setTimeZone( new DateTimeZone( 'Europe/London' ) );
echo $d->format( 'Y-m-d H:i:s (e)' ), "\n";

$d = date_create( "@1351388700" ); // one hour later
$d->setTimeZone( new DateTimeZone( 'Europe/London' ) );
echo $d->format( 'Y-m-d H:i:s (e)' ), "\n";

outputs:

2012-10-28 01:45:00 (Europe/London)
2012-10-28 01:45:00 (Europe/London)

And it's clearly not the same moment in time...

> Parsing this wouldn't be an issue, 

It is an issue - there is even an RFC (that I still need to implement) 
for it: https://wiki.php.net/rfc/datetime_and_daylight_saving_time

cheers,
Derick

-- 
http://derickrethans.nl | http://xdebug.org
Like Xdebug? Consider a donation: http://xdebug.org/donate.php
twitter: @derickr and @xdebug
Posted with an email client that doesn't mangle email: alpine

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to