Roundcube 0.9.4 released

Resolved.

The issue is / was that php.ini file which holds the configuration information for php had the timezone defined as follows:

date.timezone = "CDT"

No biggy right? WRONG. The following is the correct setting.

date.timezone = "US/Central"

How did it get there? It appears to be an issue with custombuild. If I do the following:

[root@XXX /]# cd /usr/local/directadmin/custombuild
[root@XXX custombuild]# pwd
/usr/local/directadmin/custombuild
[root@XXX custombuild]# rm options.conf
rm: remove regular file `options.conf'? y
[root@XXX custombuild]# ll options.conf
ls: cannot access options.conf: No such file or directory
[root@XXX custombuild]# ./build clean
Cannot find /usr/local/directadmin/custombuild/options.conf, writing defaults.
[root@XXX custombuild]# grep timezone options.conf
php_timezone=CDT
[root@XXX custombuild]#

I am using this version of custombuild:

# This script is written by DirectAdmin and Martynas Bendorius (smtalk)

BUILDSCRIPT_VER=2.0.0-RC6
NAME=custombuild
 
Hello,

Thanks for the report.

CustomBuild uses:
Code:
date +%Z
to make a best guess at the proper timezone, as the default php.ini doesn't give us much.

I've hunted around, and found that md5sum of the /etc/localtime did match thd md5sum of some files in /usr/share/zoneinfo, and the way I was able to get the proper format was with this large command:
Code:
cd /usr/share/zoneinfo
md5sum `find * ` 2>/dev/null | grep `md5sum /etc/localtime | cut -d\  -f1` | awk '{ print $2; }' | grep -v posix | head -n 1
Run it, and let me know what you get.

If all goes well (I'll also test on our other boxes), then I might use this to replace 'date +%Z'

John
 
CentOS and Debian seems ok with the above.
FreeBSD uses a few different things, including md5 vs md5sum, along with different output, so this is the FreeBSD version:
Code:
[COLOR=#333333]cd /usr/share/zoneinfo
[/COLOR]md5 `find *` | grep `md5 -q /etc/localtime` | cut -d'(' -f2 | cut -d')' -f1 | head -n 1
There might be a better way of going about it.. but might be all we've got (it does work, so can't complain much).

If it works for others (let us know), we can add it into CB.

John
 
[root@XXX /]# cd /usr/share/zoneinfo
[root@XXX zoneinfo]# md5sum `find * ` 2>/dev/null | grep `md5sum /etc/localtime | cut -d\ -f1` | awk '{ print $2; }' | grep -v posix | head -n 1
America/Chicago
[root@XXX zoneinfo]# grep timezone /usr/local/lib/php.ini
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = "US/Central"
 
I am on CentOS 6.4 64bit, here is the result:

Code:
[root@server~]# cd /usr/share/zoneinfo
[root@server zoneinfo]# md5sum `find * ` 2>/dev/null | grep `md5sum /etc/localtime | cut -d\  -f1` | awk '{ print $2; }' | grep -v posix | head -n 1
Arctic/Longyearbyen
[root@server zoneinfo]# grep timezone /usr/local/lib/php.ini
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = Europe/Oslo
[root@server zoneinfo]#

Arctic/Longyearbyen is also Norwegian, but is not what I like to use. However both should be fine because the timezone is the same. Also it does not matter for me, because I would always add date.timezone to php.ini manually, just like I do for other custom settings I have in php.ini. So either way, I am happy. :)

Edit: If you feel like reading about it: http://en.wikipedia.org/wiki/Longyearbyen :)
 
Last edited:
Back
Top