I’ve tried generating the complete set of timezones as specified in http://php.net/manual/en/timezones.php (except UTC) by using the following code:
$zones = timezone_identifiers_list();
print_r($zones);
But this list seems to skip ~ 50 regions, eg: Pacific/Samoa (as compared to http://php.net/manual/en/timezones.php)
What are we doing wrong?
phpinfo() shows:
PHP Version 5.3.4
Apache Version Apache/2.2.3 (CentOS)
$ uname -r
2.6.18-028stab070.14
Edit #2
date
date/time support enabled
"Olson" Timezone Database Version 0.system
Timezone Database internal
Default timezone UTC
Your timezone database might not be up-to-date.
Try following the link at the bottom of the List of Supported Timezones page :
Edit after the comments : to update your timezone database, as you are on a Linux system, you can use the
peclcommand (I just tried this on my Ubuntu machine) :This will download the new version, and compile it.
Then, if you enable the new
timezonedbextension, your PHP should use an uptodate database :If I try without enabling that new extension, I get the same kind of thing you had before :