I want to keep my PHP time zone info up to date. When we update the system's tzdata package, will PHP use this updated info?
Currently phpinfo() reports
"Olson" Timezone Database Version => 0.system
But does that mean PHP is using the system's database (which is getting updated), or just the time zone database from when the PHP package was distributed?
I know that we can install the pecl package timezonedb to get updated information, but it seems preferable to only have to update one package. We are already updating tzdata.
According to the notes from the timezone_version_get
function, 0.system
means that you are using the version that PHP shipped with. It does not mean that you are using the tzdata from your operating system.
On each release of PHP, the most current timezonedb package data is incorporated into the PHP distribution. However, a new release of the time zone database doesn't necessarily force a release of PHP. Therefore, if you want the most current version of the time zone data, then your only option is to update the timezonedb package yourself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With