Last modified: 2014-09-24 00:51:22 UTC
While mediawiki's UTC default is good for massively international sites, many local or workgroup wikis would much prefer using local time as default. It may be good to provide an option at install time to make it easier to set up this way.
Created attachment 6435 [details] Patch to add timezone selection at installation I wanted to try and fixa a bug, and this seemed easy enough for me :) so here is a patch. I also requires the file includes/TimeZones.php which I will upload imidiatly after I'm done with the patch upload.
Created attachment 6436 [details] Holds an array of valid timezone options This file goes into includes directory and the earlier supplied patch depends on it
Hmmm.... there shouldn't be any need to make our own timezone database; we've already got access to the system TZ database through the DateTime class and friends, as done in Special:Preferences.
Created attachment 6437 [details] Patch to add timezone selection at installation Right, as it seems any value in DateTimeZone::listIdentifiers() is a valid option for $wgLocaltimezone I just went ahead and used that function instead, so there is no longer any need for the array of time zones. I probably should mention that what this patch does is that it adds a section to LocalSettings.php per the primary instructions in http://www.mediawiki.org/wiki/Manual:Timezone. It only does this if it's not running in safe mode however (and if it is, the selection should be entirely invisible at installation). /Micke
Why not make a hideable section on the install page for "optional" or "non-important" settings. When unhid, these settings can be configured away from their default position (which obviously is presented), if they are changed, they will be added to the LocalSettings.php, otherwise they won't make it in there. One of these settings could be the change timezones, but it could also be one that was "enable uploads" from before and stuff like that. I realise this is more UI work over what can be changed easily later in the LocalSettings.php, but if we are going this way with this bug anyway, I do not see a reason not to go all in.
Should probably patch this against the new-installer branch. Don't really see a huge reason to keep putting new things in the installer that's going away.
Trying to lure Chad into taking this...
(In reply to comment #6) > Should probably patch this against the new-installer branch. Don't really see a > huge reason to keep putting new things in the installer that's going away. Micke Nordin, thank you for your patch. Do you have time and interest in revising it so it works with our current codebase? Thanks!
I'll look into this agin and see if I can familiarize myself with the new installer.
I suppose it would make sense to put this in the optional section of the installer? I'll see if I can figure out how to do that :)
It seems to be the class WebInstaller_Options in includes/installer/WebInstallerPage.php that needs to be patched with a with a dropdown menu like the ones used in WebInstaller_Language.
Created attachment 11724 [details] A patch to add a timezone selector to the webinstaller Ok, I think this should work. It does for me.
Hi Micke! Thanks for your reworked patch! Could you merge your patch into one patch that can be applied to the codebase, instead of the current situation that your latest patch depends on your previous patch? Furthermore, you are very welcome to use Developer access https://www.mediawiki.org/wiki/Developer_access to submit this as a Git branch directly into Gerrit: https://www.mediawiki.org/wiki/Git/Tutorial Putting your branch in Git makes it easier for us to review it quickly. Thanks again! We appreciate your contribution.
Created attachment 11727 [details] Fix for bug 19991 A clean diff
There is a new clean diff now, I'll look in to the git stuff as well to see if I can get a branch in gerrit.
Ok, I put it in gerrit now as well: https://gerrit.wikimedia.org/r/47442 I hope I got everything right :)
Patch in Gerrit needs rework...
Change 47442 had a related patch set uploaded by Nemo bis: Added a timezone selector to the webinstaller https://gerrit.wikimedia.org/r/47442