config wizard time zone?

how about the "1st time config wizard" in virtualmin ask the user what timezone the server is in, and set up the OS time (/etc/localtime?) and global php.ini timezones so correct time is used?

Status: 
Closed (fixed)

Comments

This can be done at Webmin -> Hardware -> System Time already.

Also, does the timezone really need to be set in php.ini ... or will it pick up the system timezone by default?

thanks, i didnt see that "hardware - system time" setting, but i think it makes sense to have it in the wizard because not every server is in GMT -7 (usa) ;) so it should be one of the first things to change because the default in the coudmin system images is GMT -7.

no, php will not work without the php.ini value. every time you use date() function in php, it will use system time but also spit out warnings saying this all over your websites:

Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Anchorage' for 'AKDT/-8.0/DST' instead in /Users/dan/Sites/pfrr/wp-includes/functions.php on line 112

One quick fix that I will implement is having Virtualmin set the correct timezone in php.ini when creating a virtual server.

and for the server itself? its /etc/localtime is GMT -7 in your premade images

One fix that we could implement is to sync the VM timezone with the host after creation in Cloudmin - that would solve this kind of problem automatically.

yes that sounds like a very nice idea, sync to /etc/localtime and also to default php.ini would be good :)

also i saw a problem in "Webmin -> Hardware -> System Time " it only worked atfer i edit module config and say "system does not support hardware time" before that i got blank pages so maybe fix that too in installer. i use xen maybe that is why it has no hardware time...

The issue on Xen will be fixed in Webmin 1.620.

okay good to hear! :)

hmm i cant see my latest posts in here but i saw your reply :P

Time zone syncing for new VMs has been implemented, and will be in Cloudmin 6.9.

Automatically closed -- issue fixed for 2 weeks with no activity.