Hello together,
just wanted to mention, what the list of supported Timezones has changedin
5.4.
It's already mentioned here, that all "special" timezones, expect of UTC
are deprecated:
http://www.php.net/manual/en/timezones.others.php
But couldn't found that in the upgrade guide...so i used CET somewhere in
my code and didn't found the error soon....
A short note in the upgrade guid would be great!
Martin Keckeis wrote:
Hello together,
just wanted to mention, what the list of supported Timezones has changedin
5.4.It's already mentioned here, that all "special" timezones, expect of UTC
are deprecated:
http://www.php.net/manual/en/timezones.others.phpBut couldn't found that in the upgrade guide...so i used CET somewhere in
my code and didn't found the error soon....A short note in the upgrade guid would be great!
This is not so much an 'upgrade' note, but rather a update to the timezone
library in general. The tz database is being 'rationalised' at the moment, and
the base list of zone names simplified, with many of these only being retained
for 'backwards' compatibility. Derick will probably add a comment, but we can
expect a few more changes over the next couple of updates to the tz data.
--
Lester Caine - G8HFL
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk
Hi lester,
2013/9/9 Lester Caine lester@lsces.co.uk
Martin Keckeis wrote:
Hello together,
just wanted to mention, what the list of supported Timezones has changedin
5.4.It's already mentioned here, that all "special" timezones, expect of UTC
are deprecated:
http://www.php.net/manual/en/**timezones.others.phphttp://www.php.net/manual/en/timezones.others.phpBut couldn't found that in the upgrade guide...so i used CET somewhere in
my code and didn't found the error soon....A short note in the upgrade guid would be great!
This is not so much an 'upgrade' note, but rather a update to the timezone
library in general. The tz database is being 'rationalised' at the moment,
and the base list of zone names simplified, with many of these only being
retained for 'backwards' compatibility. Derick will probably add a comment,
but we can expect a few more changes over the next couple of updates to the
tz data.
Okay no problem, just wanted to mention it.
If you use a deprecated Timezone somewhere and don't know it, it's hard to
track down...(no exception)
I only found it "randomly" today, that i've used it there and all time data
in the database are not correct...
If you use something like:
\DateTime::createFromFormat('Y-m-d H:i:s', '2013-09-09 14:49:00', new
DateTimeZone('CET'))
Just the default timezone from ini will be used and therefor the dateTime
value is wrong if you save it or display it somewhere...
Martin Keckeis wrote:
Hi lester,
2013/9/9 Lester Caine <lester@lsces.co.uk mailto:lester@lsces.co.uk>
Martin Keckeis wrote: Hello together, just wanted to mention, what the list of supported Timezones has changedin 5.4. It's already mentioned here, that all "special" timezones, expect of UTC are deprecated: http://www.php.net/manual/en/__timezones.others.php <http://www.php.net/manual/en/timezones.others.php> But couldn't found that in the upgrade guide...so i used CET somewhere in my code and didn't found the error soon.... A short note in the upgrade guid would be great! This is not so much an 'upgrade' note, but rather a update to the timezone library in general. The tz database is being 'rationalised' at the moment, and the base list of zone names simplified, with many of these only being retained for 'backwards' compatibility. Derick will probably add a comment, but we can expect a few more changes over the next couple of updates to the tz data.
Okay no problem, just wanted to mention it.
If you use a deprecated Timezone somewhere and don't know it, it's hard to track
down...(no exception)
I only found it "randomly" today, that i've used it there and all time data in
the database are not correct...If you use something like:
\DateTime::createFromFormat('Y-m-d H:i:s', '2013-09-09 14:49:00', new
DateTimeZone('CET'))Just the default timezone from ini will be used and therefor the dateTime value
is wrong if you save it or display it somewhere...
That sounds like a different problem. I've no time to play at the moment, but
does an 'non-existent' timezone give you an error? Or is it just the 'retired'
timezone names that are a problem?
--
Lester Caine - G8HFL
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk
If you use a deprecated Timezone somewhere and don't know it, it's hard to
track down...(no exception)
I only found it "randomly" today, that i've used it there and all time data
in the database are not correct...If you use something like:
\DateTime::createFromFormat('Y-m-d H:i:s', '2013-09-09 14:49:00', new
DateTimeZone('CET'))Just the default timezone from ini will be used and therefor the dateTime
value is wrong if you save it or display it somewhere...
That is not true. CET is actually mapped to Europe/Berlin. This mapping
was made specifically for BC reasons.
derick@whisky:~ $ php
<?php
$a = \DateTime::createFromFormat('Y-m-d H:i:s', '2013-09-09 14:49:00' );
var_dump( $a );
?>
class DateTime#1 (3) {
public $date =>
string(19) "2013-09-09 14:49:00"
public $timezone_type =>
int(3)
public $timezone =>
string(13) "Europe/London"
}
derick@whisky:~ $ php
<?php
$a = \DateTime::createFromFormat('Y-m-d H:i:s', '2013-09-09 14:49:00', new DateTimeZone('CET'));
var_dump( $a );
?>
class DateTime#2 (3) {
public $date =>
string(19) "2013-09-09 14:49:00"
public $timezone_type =>
int(3)
public $timezone =>
string(13) "Europe/Berlin"
}
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
If you use a deprecated Timezone somewhere and don't know it, it's hard to
track down...(no exception)
I only found it "randomly" today, that i've used it there and all time data
in the database are not correct...If you use something like:
\DateTime::createFromFormat('Y-m-d H:i:s', '2013-09-09 14:49:00', new
DateTimeZone('CET'))Just the default timezone from ini will be used and therefor the dateTime
value is wrong if you save it or display it somewhere...That is not true. CET is actually mapped to Europe/Berlin. This mapping
was made specifically for BC reasons.
Or even in a smaller example:
derick@whisky:~ $ php -r '$a = new DateTimeZone("CET"); echo $a->getName(), "\n";'
Europe/Berlin
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
Martin Keckeis wrote:
just wanted to mention, what the list of supported Timezones has
changedin 5.4.It's already mentioned here, that all "special" timezones, expect of
UTC are deprecated:
http://www.php.net/manual/en/timezones.others.phpBut couldn't found that in the upgrade guide...so i used CET
somewhere in my code and didn't found the error soon....A short note in the upgrade guid would be great!
This is not so much an 'upgrade' note, but rather a update to the
timezone library in general. The tz database is being 'rationalised'
at the moment, and the base list of zone names simplified, with many
of these only being retained for 'backwards' compatibility. Derick
will probably add a comment, but we can expect a few more changes over
the next couple of updates to the tz data.
We will see what happens there. As far as I know most of those changes
have been reverted in the TZDB anyway.
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
Derick Rethans wrote:
This is not so much an 'upgrade' note, but rather a update to the
timezone library in general. The tz database is being 'rationalised'
at the moment, and the base list of zone names simplified, with many
of these only being retained for 'backwards' compatibility. Derick
will probably add a comment, but we can expect a few more changes over
the next couple of updates to the tz data.
We will see what happens there. As far as I know most of those changes
have been reverted in the TZDB anyway.
The discussion on 'extended' timezones is still going on ;)
Daylight saving did not start in 1970, but the recent proposed change in tz was
to ignore them to simplify the list of timezones. That has now been reverted,
but how to handle the additional information has not yet been agreed. The tz
dataabse will probably not return pre 1970 date, you will need a different build
of tz to get that. Which is something I think is simply wrong! We have
increasingly accurate pre 1970 data but that requires additional timezone names
which the basic tz database will not support.
--
Lester Caine - G8HFL
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk
Hello together,
just wanted to mention, what the list of supported Timezones has changedin
5.4.It's already mentioned here, that all "special" timezones, expect of UTC
are deprecated:
http://www.php.net/manual/en/timezones.others.phpBut couldn't found that in the upgrade guide...so i used CET somewhere in
my code and didn't found the error soon....A short note in the upgrade guid would be great!
But nothing changed at all. CET has always been in "others" and should
be avoided just like the documentation says.
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