PHP Fatal error: date(): Timezone database is corrupt

Came over this one on a stripped down, chroot’ed, shell server. The php date() function need access to files in /usr/share/zoneinfo , zoneinfo wasn’t inside the chroot so the fix was easy:

# cp -a /usr/share/zoneinfo /path/to/chroot/usr/share/

2 comments on “PHP Fatal error: date(): Timezone database is corrupt

  1. Liang Sun October 29, 2013 1:58 pm

    You know what? You saved my life. I search this problem for a whole day! Just copy the time zone info folder. Really really thank you!

Leave a Reply to Joar Jegleim Cancel Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.