Code: Select all
/** * Time Zone Conversion Table */ '-12' => '', // [UTC - 12] Baker Island Time '-11' => 'Pacific/Samoa', // [UTC - 11] Niue Time, Samoa Standard Time '-10' => 'Pacific/Tahiti', // [UTC - 10] Hawaii-Aleutian Standard Time, Cook Island Time '-9.5' => '', // [UTC - 9:30] Marquesas Islands Time '-9' => 'America/Anchorage', // [UTC - 9] Alaska Standard Time, Gambier Island Time '-8' => 'America/Los_Angeles', // [UTC - 8] Pacific Standard Time '-7' => 'America/Phoenix', // [UTC - 7] Mountain Standard Time '-6' => 'America/Detroit', // [UTC - 6] Central Standard Time '-5' => 'America/Chicago', // [UTC - 5] Eastern Standard Time '-4.5' => '', // [UTC - 4:30] Venezuelan Standard Time '-4' => 'America/Grenada', // [UTC - 4] Atlantic Standard Time '-3.5' => '', // [UTC - 3:30] Newfoundland Standard Time '-3' => 'America/Sao_Paulo', // [UTC - 3] Amazon Standard Time, Central Greenland Time '-2' => 'America/Scoresbysund', // [UTC - 2] Fernando de Noronha Time, South Georgia & the South Sandwich Islands Time '-1' => 'Atlantic/Cape_Verde', // [UTC - 1] Azores Standard Time, Cape Verde Time, Eastern Greenland Time '0' => 'Europe/London', // [UTC] Western European Time, Greenwich Mean Time '1' => 'Europe/Berlin', // [UTC + 1] Central European Time, West African Time '2' => 'Europe/Kiev', // [UTC + 2] Eastern European Time, Central African Time '3' => 'Europe/Moscow', // [UTC + 3] Moscow Standard Time, Eastern African Time '3.5' => 'Asia/Tehran', // [UTC + 3:30] Iran Standard Time '4' => 'Asia/Dubai', // [UTC + 4] Gulf Standard Time, Samara Standard Time '4.5' => 'Asia/Kabul', // [UTC + 4:30] Afghanistan Time '5' => 'Asia/Karachi', // [UTC + 5] Pakistan Standard Time, Yekaterinburg Standard Time '5.5' => 'Asia/Calcutta', // [UTC + 5:30] Indian Standard Time, Sri Lanka Time '5.75' => 'Asia/Katmandu', // [UTC + 5:45] Nepal Time '6' => 'Asia/Novosibirsk', // [UTC + 6] Bangladesh Time, Bhutan Time, Novosibirsk Standard Time '6.5' => 'Asia/Rangoon', // [UTC + 6:30] Cocos Islands Time, Myanmar Time '7' => 'Asia/Bangkok', // [UTC + 7] Indochina Time, Krasnoyarsk Standard Time '8' => 'Asia/Shanghai', // [UTC + 8] Chinese Standard Time, Australian Western Standard Time, Irkutsk Standard Time '8.75' => '', // [UTC + 8:45] Southeastern Western Australia Standard Time '9' => 'Asia/Tokyo', // [UTC + 9] Japan Standard Time, Korea Standard Time, Chita Standard Time '9.5' => '', // [UTC + 9:30] Australian Central Standard Time '10' => 'Asia/Vladivostok', // [UTC + 10] Australian Eastern Standard Time, Vladivostok Standard Time '10.5' => 'Australia/Lord_Howe', // [UTC + 10:30] Lord Howe Standard Time '11' => 'Pacific/Guadalcanal', // [UTC + 11] Solomon Island Time, Magadan Standard Time '11.5' => 'Pacific/Norfolk', // [UTC + 11:30] Norfolk Island Time '12' => 'Pacific/Auckland', // [UTC + 12] New Zealand Time, Fiji Time, Kamchatka Standard Time '12.75' => 'Pacific/Chatham', // [UTC + 12:45] Chatham Islands Time '13' => 'Pacific/Tongatapu', // [UTC + 13] Tonga Time, Phoenix Islands Time '14' => 'Pacific/Kiritimati', // [UTC + 14] Line Island Time
We could of course make a simple find/replace array that converts some cities to the old phpBB3 name. We could also scratch all cities but some two dozen and have just those options (with replaced names as you suggest). But that is just not what this MOD is about. This MOD is about Automatic Daylight Savings Time and thanks to non-unanimous geopolitics you just cannot determine DST from the "UTC + X" time zone! For example in UTC-7 alone there are US states which sport DST (Colorado) and some which do not (Arizona). In the city-based system the user may choose America/Denver and America/Phoenix respectively and be done with it. If I'd opt for the UTC dropdown box I'd have to re-introduce the UCP option of "Enable DST: YES / NO" which to eliminate was this MOD's whole point.Muad''Dib wrote:So i stated changing some things around. I set my own timezone to -8.00 (within phpmyadmin), and changed the definition in "convert_timezones.php" to what i wanted it to say
"[UTC - 8] Pacific Standard Time". This showed what i wanted it to on the board, but of course all that does is basically change what is in the database for my user account.. and that is what is printed on the board itself. It doesnt change the actual drop down lists in UCP or ACP..
what i was thinking was, why cant the print in the drop down boxes use the $timetable array that is similar to what is in convert_timezones.php?
If you want to make sure people find their time zone - and the more I think about it the more I have to agree - we'll give them the full list of available ones. Do it this way for now (next version will default to this):Muad''Dib wrote:I guess this is so important to me because one think im concearned about is most people know what time zone they are in if its in [UTC -2] format. However, some i can easily see get confused as to what city is in the same timezone as them. It may or may not truly be the case, however it makes since in my mind!
Code: Select all
$cities = array_unique($cities);
The UTC timezones itself bare no information about DST settings and that is why I must use the city-based time zones. Clear now?Muad''Dib wrote:Its still slightly confusing to me .. but i think i understand where your coming from. Time is such a pos isnt it?
Yes thanks. I hope i havent completly made you frustrated with my newbish inquiriesMartectX wrote:Version 1.1.4
- Some spelling mistakes
- Optimization of the time zone conversion utility
- Support for all available city-based time zonesThe UTC timezones itself bare no information about DST settings and that is why I must use the city-based time zones. Clear now?Muad''Dib wrote:Its still slightly confusing to me .. but i think i understand where your coming from. Time is such a pos isnt it?
Not at all. Actually I'm sure there will be lots of wondrous comments about the new time zone system once this upgrade is validated so I could as well now create some templates to copy & paste later.Muad''Dib wrote:Yes thanks. I hope i havent completly made you frustrated with my newbish inquiries
What version of PHP are you using?papaFX wrote:Used to have the old MOD, but due to server relocation I tried to use the beta one.
After following the install instruction I have the following error
"Fatal error: Call to undefined function: date_default_timezone_set() in /home/eastmedf/dev_forum/includes/automatic_dst.php on line 75
Any help would be appreciated.
My board is v3.0.4 and no other MODs installed, just a style...
What is the "safety" difference between public_html and the other folder where it didn't work?papaFX wrote:5.2.5
I temp solved the problem by moving the files to a directory under "public_html".
(initially the files where out of that dir for safety reasons)
Users browsing this forum: No registered users and 18 guests