DST in Perl and PHP on Centos

Asked

Viewed 45 times

1

I’m having a summer-time problem at Centos 7.8. The tzdata package has already been updated to not change the time (standard system package), but the functions in Perl and PHP continue to report 1h more.

# yum list tzdata
Loaded plugins: fastestmirror, product-id, rhnplugin, search-disabled-repos, subscription-manager
This system is receiving updates from RHN Classic or Red Hat Satellite.
Loading mirror speeds from cached hostfile
Installed Packages
tzdata.noarch                                          2020d-2.el7                                           @centos7-x86_64-updates

# ls -l /etc/localtime
lrwxrwxrwx. 1 root root 37 Set 25  2019 /etc/localtime -> /usr/share/zoneinfo/America/Sao_Paulo

Difference in dates:

# date
Seg Nov 16 11:38:52 -03 2020

# perl -MDateTime -le'print DateTime->now->set_time_zone("UTC")'
2020-11-16T14:38:52

# perl -MDateTime -le'print DateTime->now->set_time_zone("America/Sao_Paulo")'
2020-11-16T12:38:52

I upgraded the system, rebooted, but I can’t see the correct time in Timezone America/Sao_paulo in PHP scripts and web applications.

Where would be the wrong definition of Timezone?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.