msimerson / Mail-Toaster-6

Mail Toaster 6
https://github.com/msimerson/Mail-Toaster-6/wiki
BSD 3-Clause "New" or "Revised" License
46 stars 16 forks source link

Fix timezone detection for php.ini #516

Closed tuffnatty closed 1 year ago

tuffnatty commented 1 year ago

For some timezones, timezone detection in configure_php_ini() is broken, e.g. here this code returns multiple timezone names for a single MD5 hash:

(TZ=$(md5 -q /etc/localtime); find /usr/share/zoneinfo -type f -print0 | xargs -0 md5 -r | grep "$TZ" )
4790e83465681cefbf852aed265354bf /usr/share/zoneinfo/Europe/Berlin
4790e83465681cefbf852aed265354bf /usr/share/zoneinfo/Europe/Copenhagen
4790e83465681cefbf852aed265354bf /usr/share/zoneinfo/Europe/Oslo
4790e83465681cefbf852aed265354bf /usr/share/zoneinfo/Europe/Stockholm
4790e83465681cefbf852aed265354bf /usr/share/zoneinfo/Arctic/Longyearbyen
4790e83465681cefbf852aed265354bf /usr/share/zoneinfo/Atlantic/Jan_Mayen

The patch skips all entries except the first one.

Changes proposed in this pull request:

-

-

Fixes # .

Checklist: