On Sep 2, 2012 4:39 PM, "Andrew Faulds" <a...@ajf.me> wrote:
>
> On 02/09/12 18:20, Derick Rethans wrote:
>>
>>
>> No it's not unambigious:
>>
>> $ php -r 'date_default_timezone_set("Europe/London"); echo
date_create()->format(DateTime::ISO8601), "\n";'
>> 2012-09-02T18:17:36+0100
>>
>> $ php -r 'date_default_timezone_set("Africa/Niamey"); echo
date_create()->format(DateTime::ISO8601), "\n";'
>> 2012-09-02T18:19:05+0100
>>
>> vs:
>>
>> $ php -r 'date_default_timezone_set("Africa/Niamey"); echo
date_create("2012-12-31")->format(DateTime::ISO8601), "\n";'
>> 2012-12-31T00:00:00+0100
>>                     ^^^^^
>>
>> $ php -r 'date_default_timezone_set("Europe/London"); echo
date_create("2012-12-31")->format(DateTime::ISO8601), "\n";'
>> 2012-12-31T00:00:00+0000
>>                     ^^^^^
>
> I'm a little confused as to what is going on here, but ISO8601 has a UTC
format, YYYY-MM-DDTHH:MM:SSZ.

I think the issue on most minds is the TZ aspect. I agree with the others
on using UTC. I also think ill suggest a different approach to this.

>>
>> cheers,
>> Derick
>
>
>
> --
> Andrew Faulds
> http://ajf.me/
>

Reply via email to