On Wed, 26 Oct 2011, Stas Malyshev wrote:

> > Please take a moment to review the DateTime transitions RFC and vote 
> > on it.  I encourage voting on it to ensure we are all on the same 
> > page as to how PHP will handle transitions.  Voting is open through 
> > 10/31.
> 
> Reading this RFC, I have some questions:
> 
> 1. Would this ST/DST be used on format() too? If yes, then we;d get a 
> format that nobody but PHP can parse. If no, then we don't have 
> roundtrip for format/parse to read the same date as you wrote.

No, why would it show up in format? The problem with expressing date and 
time when they exist twice is just an annoyance, and it's difficult to 
do a roundtrip in any case. We can add a format argument for it though, 
but I am not sure how useful that is.

> 2. What is the intended use case for this syntax? I.e., if I am getting a date
> from somewhere, how this ST/DST is getting there? It can't come from the UI
> since no user and no external system would know how to generate these, and if
> it's supposed to be generated by the code, we get kind of chicken-and-egg
> problem here - to generate right ST/DST suffix, we already need to know what
> this date string says. So I'm a bit unclear on the use case here, especially
> if you're proposing to throw exceptions if the times are out of very specific
> hour - that means to create this suffix I'd have to know if we're in this hour
> or not - but how would I know that?

If you don't know it, don't pass it in! Then PHP will guess, just as it 
does now and always has done. It's just an extra help in case you need 
to be specific about whether you want the ST or DST variant of "02:30".
 
You can just use EDT/EST anyway, and that would work too (but of course 
not set a tz=3 timezone on the object).

Derick

-- 
http://derickrethans.nl | http://xdebug.org
Like Xdebug? Consider a donation: http://xdebug.org/donate.php
twitter: @derickr and @xdebug

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

Reply via email to