On 15/12/11 21:17, Pierre Joye wrote:
> On Wed, Dec 14, 2011 at 11:14 PM, Stas Malyshev <smalys...@sugarcrm.com> 
> wrote:
>> Hi!
>>
>>
>>> I believe he's referring to sys/time.h, but this introduces
>>> portability issues.  If it were just unix, that would be one thing.
>>> But maintaining this and a Windows alternative, and I have no idea
>>> what that is, is not worth it IMO.
>>
>> Yes, portability is questionable. Though if we had a good patch that allows
>> to do it, I don't think it would be too bad to have it. Even Unix-only might
>> be (again, if enough people need it) fine, if we could use the data properly
>> in timelib functions.
> By portability it is not (only) about APIs, APIs wrapping is easy
> these days, even on Windows.
>
> But the actual problem is to get a consistent and constantly updated
> set of data, reliable data. Data that applications can use blindly on
> any platforms without having to worry about bad information, as long
> as they use the latest PHP or timezone release (via PECL for example).
>
> And that, as stated earlier, is why we should not provide any
> alternative as any other solutions failed so far. It is also even less
> important as Oleg's target is the developer environment. If a
> developer cannot set his TZ correctly in a php.ini or in his
> application on his development box, then something is wrong there, but
> not in php :)
>
> For production server, I would never ever suggest to use the system's
> TZ, no matter the OS/distros/etc..
>
> Cheers,

Isn't this whole thread about client-side apps, not server-side. For
client-side stuff it doesn't make sense to use anything but the system
tz. Should we be expecting users to have to edit php.ini files every
time they hop on a plane or drive across a tz border? And what about
non-developers?

Keeping the tz database up to date is a very annoying issue. System tz
data is typically more up-to-date as it's pushed to the user, while with
php, you need to have admin rights to install an updated tz database, or
hope that the packager for your distro (or your web-host) does it for
you. As far as I can tell, most hosts do not update timezone data from
PECL. I just checked one host that is still on 5.2:

date/time support     enabled
"Olson" Timezone Database Version     2010.9
Timezone Database     internal
Default timezone     UTC

Sigh...

Ubuntu however reports 0.system as the tz version. Does that mean that
PHP there is using the system's tz database instead?

Cheers
David

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

Reply via email to