Derek Jones | 8ede1a2 | 2011-10-05 13:34:52 -0500 | [diff] [blame] | 1 | ########### |
| 2 | Date Helper |
| 3 | ########### |
| 4 | |
| 5 | The Date Helper file contains functions that help you work with dates. |
| 6 | |
| 7 | .. contents:: Page Contents |
| 8 | |
| 9 | Loading this Helper |
| 10 | =================== |
| 11 | |
| 12 | This helper is loaded using the following code |
| 13 | |
| 14 | :: |
| 15 | |
| 16 | $this->load->helper('date'); |
| 17 | |
| 18 | The following functions are available: |
| 19 | |
| 20 | now() |
| 21 | ===== |
| 22 | |
| 23 | Returns the current time as a Unix timestamp, referenced either to your |
Iban Eguia | 7400965 | 2012-06-13 22:57:50 +0200 | [diff] [blame] | 24 | server's local time or any PHP suported timezone, based on the "time reference" |
| 25 | setting in your config file. If you do not intend to set your master time reference |
| 26 | to any other PHP suported timezone (which you'll typically do if you run a site that |
| 27 | lets each user set their own timezone settings) there is no benefit to using this |
Derek Jones | 8ede1a2 | 2011-10-05 13:34:52 -0500 | [diff] [blame] | 28 | function over PHP's time() function. |
| 29 | |
Iban Eguia | 7bf0a4f | 2012-03-27 18:36:15 +0200 | [diff] [blame] | 30 | .. php:method:: now($timezone = NULL) |
| 31 | |
| 32 | :param string $timezone: The timezone you want to be returned |
| 33 | :returns: integer |
| 34 | |
| 35 | :: |
Iban Eguia | feb14da | 2012-06-12 16:09:36 +0200 | [diff] [blame] | 36 | echo now("Australia/Victoria"); |
Iban Eguia | 7bf0a4f | 2012-03-27 18:36:15 +0200 | [diff] [blame] | 37 | |
Iban Eguia | feb14da | 2012-06-12 16:09:36 +0200 | [diff] [blame] | 38 | If a timezone is not provided, it will return time() based on "time_reference" setting. |
Derek Jones | 8ede1a2 | 2011-10-05 13:34:52 -0500 | [diff] [blame] | 39 | |
| 40 | mdate() |
| 41 | ======= |
| 42 | |
Andrey Andreev | ac57033 | 2012-07-04 13:04:10 +0300 | [diff] [blame] | 43 | This function is identical to PHP's `date() <http://www.php.net/date>`_ |
Derek Jones | 8ede1a2 | 2011-10-05 13:34:52 -0500 | [diff] [blame] | 44 | function, except that it lets you use MySQL style date codes, where each |
| 45 | code letter is preceded with a percent sign: %Y %m %d etc. |
| 46 | |
| 47 | The benefit of doing dates this way is that you don't have to worry |
| 48 | about escaping any characters that are not date codes, as you would |
| 49 | normally have to do with the date() function. Example |
| 50 | |
| 51 | .. php:method:: mdate($datestr = '', $time = '') |
| 52 | |
| 53 | :param string $datestr: Date String |
| 54 | :param integer $time: time |
| 55 | :returns: integer |
| 56 | |
| 57 | |
| 58 | :: |
| 59 | |
| 60 | $datestring = "Year: %Y Month: %m Day: %d - %h:%i %a"; |
| 61 | $time = time(); |
| 62 | echo mdate($datestring, $time); |
| 63 | |
| 64 | If a timestamp is not included in the second parameter the current time |
| 65 | will be used. |
| 66 | |
| 67 | standard_date() |
| 68 | =============== |
| 69 | |
| 70 | Lets you generate a date string in one of several standardized formats. |
| 71 | Example |
| 72 | |
| 73 | .. php:method:: standard_date($fmt = 'DATE_RFC822', $time = '') |
| 74 | |
| 75 | :param string $fmt: the chosen format |
| 76 | :param string $time: Unix timestamp |
| 77 | :returns: string |
| 78 | |
| 79 | :: |
| 80 | |
| 81 | $format = 'DATE_RFC822'; |
| 82 | $time = time(); |
| 83 | echo standard_date($format, $time); |
| 84 | |
| 85 | The first parameter must contain the format, the second parameter must |
| 86 | contain the date as a Unix timestamp. |
| 87 | |
Andrey Andreev | ac57033 | 2012-07-04 13:04:10 +0300 | [diff] [blame] | 88 | .. note:: This function is DEPRECATED. Use the native ``date()`` combined |
| 89 | with `DateTime's format constants <http://www.php.net/manual/en/class.datetime.php#datetime.constants.types>`_ |
| 90 | instead: |
| 91 | |
| 92 | | |
| 93 | | echo date(DATE_RFC822, time()); |
| 94 | |
Derek Jones | 8ede1a2 | 2011-10-05 13:34:52 -0500 | [diff] [blame] | 95 | Supported formats: |
| 96 | |
Derek Jones | ce79be0 | 2012-06-25 23:23:46 -0700 | [diff] [blame] | 97 | =============== ======================= ====================================== |
| 98 | Constant Description Example |
| 99 | =============== ======================= ====================================== |
Andrey Andreev | ac57033 | 2012-07-04 13:04:10 +0300 | [diff] [blame] | 100 | DATE_ATOM Atom 2005-08-15T16:13:03+0000 |
| 101 | DATE_COOKIE HTTP Cookies Sun, 14 Aug 2005 16:13:03 UTC |
| 102 | DATE_ISO8601 ISO-8601 2005-08-14T16:13:03+00:00 |
| 103 | DATE_RFC822 RFC 822 Sun, 14 Aug 05 16:13:03 UTC |
| 104 | DATE_RFC850 RFC 850 Sunday, 14-Aug-05 16:13:03 UTC |
| 105 | DATE_RFC1036 RFC 1036 Sunday, 14-Aug-05 16:13:03 UTC |
| 106 | DATE_RFC1123 RFC 1123 Sun, 14 Aug 2005 16:13:03 UTC |
| 107 | DATE_RFC2822 RFC 2822 Sun, 14 Aug 2005 16:13:03 +0000 |
| 108 | DATE_RSS RSS Sun, 14 Aug 2005 16:13:03 UTC |
| 109 | DATE_W3C W3C 2005-08-14T16:13:03+0000 |
Derek Jones | ce79be0 | 2012-06-25 23:23:46 -0700 | [diff] [blame] | 110 | =============== ======================= ====================================== |
Derek Jones | 8ede1a2 | 2011-10-05 13:34:52 -0500 | [diff] [blame] | 111 | |
| 112 | local_to_gmt() |
| 113 | ============== |
| 114 | |
Mat Whitney | 7540ded | 2012-06-22 12:02:10 -0700 | [diff] [blame] | 115 | Takes a Unix timestamp as input and returns it as GMT. |
Derek Jones | 8ede1a2 | 2011-10-05 13:34:52 -0500 | [diff] [blame] | 116 | |
| 117 | .. php:method:: local_to_gmt($time = '') |
| 118 | |
| 119 | :param integer $time: Unix timestamp |
| 120 | :returns: string |
| 121 | |
| 122 | Example: |
| 123 | |
| 124 | :: |
| 125 | |
| 126 | $now = time(); |
| 127 | $gmt = local_to_gmt($now); |
| 128 | |
| 129 | gmt_to_local() |
| 130 | ============== |
| 131 | |
| 132 | Takes a Unix timestamp (referenced to GMT) as input, and converts it to |
| 133 | a localized timestamp based on the timezone and Daylight Saving time |
| 134 | submitted. |
| 135 | |
| 136 | .. php:method:: gmt_to_local($time = '', $timezone = 'UTC', $dst = FALSE) |
| 137 | |
| 138 | :param integer $time: Unix timestamp |
| 139 | :param string $timezone: timezone |
| 140 | :param boolean $dst: whether DST is active |
| 141 | :returns: integer |
| 142 | |
| 143 | Example |
| 144 | |
| 145 | :: |
| 146 | |
| 147 | $timestamp = '1140153693'; |
| 148 | $timezone = 'UM8'; |
| 149 | $daylight_saving = TRUE; |
| 150 | echo gmt_to_local($timestamp, $timezone, $daylight_saving); |
| 151 | |
| 152 | |
| 153 | .. note:: For a list of timezones see the reference at the bottom of this page. |
| 154 | |
| 155 | |
| 156 | mysql_to_unix() |
| 157 | =============== |
| 158 | |
Mat Whitney | 7540ded | 2012-06-22 12:02:10 -0700 | [diff] [blame] | 159 | Takes a MySQL Timestamp as input and returns it as Unix. |
Derek Jones | 8ede1a2 | 2011-10-05 13:34:52 -0500 | [diff] [blame] | 160 | |
| 161 | .. php:method:: mysql_to_unix($time = '') |
| 162 | |
| 163 | :param integer $time: Unix timestamp |
| 164 | :returns: integer |
| 165 | |
| 166 | Example |
| 167 | |
| 168 | :: |
| 169 | |
Fumito Mizuno | bb859fd | 2011-10-14 20:05:34 +0900 | [diff] [blame] | 170 | $mysql = '20061124092345'; |
| 171 | $unix = mysql_to_unix($mysql); |
Derek Jones | 8ede1a2 | 2011-10-05 13:34:52 -0500 | [diff] [blame] | 172 | |
| 173 | unix_to_human() |
| 174 | =============== |
| 175 | |
| 176 | Takes a Unix timestamp as input and returns it in a human readable |
| 177 | format with this prototype |
| 178 | |
| 179 | .. php:method:: unix_to_human($time = '', $seconds = FALSE, $fmt = 'us') |
| 180 | |
| 181 | :param integer $time: Unix timestamp |
| 182 | :param boolean $seconds: whether to show seconds |
| 183 | :param string $fmt: format: us or euro |
| 184 | :returns: integer |
| 185 | |
| 186 | Example |
| 187 | |
| 188 | :: |
| 189 | |
| 190 | YYYY-MM-DD HH:MM:SS AM/PM |
| 191 | |
| 192 | This can be useful if you need to display a date in a form field for |
| 193 | submission. |
| 194 | |
| 195 | The time can be formatted with or without seconds, and it can be set to |
| 196 | European or US format. If only the timestamp is submitted it will return |
| 197 | the time without seconds formatted for the U.S. Examples |
| 198 | |
| 199 | :: |
| 200 | |
| 201 | $now = time(); |
| 202 | echo unix_to_human($now); // U.S. time, no seconds |
| 203 | echo unix_to_human($now, TRUE, 'us'); // U.S. time with seconds |
| 204 | echo unix_to_human($now, TRUE, 'eu'); // Euro time with seconds |
| 205 | |
| 206 | human_to_unix() |
| 207 | =============== |
| 208 | |
| 209 | The opposite of the above function. Takes a "human" time as input and |
| 210 | returns it as Unix. This function is useful if you accept "human" |
| 211 | formatted dates submitted via a form. Returns FALSE (boolean) if the |
Mat Whitney | 7540ded | 2012-06-22 12:02:10 -0700 | [diff] [blame] | 212 | date string passed to it is not formatted as indicated above. |
Derek Jones | 8ede1a2 | 2011-10-05 13:34:52 -0500 | [diff] [blame] | 213 | |
| 214 | .. php:method:: human_to_unix($datestr = '') |
| 215 | |
| 216 | :param integer $datestr: Date String |
| 217 | :returns: integer |
| 218 | |
| 219 | Example: |
| 220 | |
| 221 | :: |
| 222 | |
| 223 | $now = time(); |
| 224 | $human = unix_to_human($now); |
| 225 | $unix = human_to_unix($human); |
| 226 | |
| 227 | nice_date() |
| 228 | =========== |
| 229 | |
| 230 | This function can take a number poorly-formed date formats and convert |
| 231 | them into something useful. It also accepts well-formed dates. |
| 232 | |
| 233 | The function will return a Unix timestamp by default. You can, |
| 234 | optionally, pass a format string (the same type as the PHP date function |
Mat Whitney | 7540ded | 2012-06-22 12:02:10 -0700 | [diff] [blame] | 235 | accepts) as the second parameter. |
Derek Jones | 8ede1a2 | 2011-10-05 13:34:52 -0500 | [diff] [blame] | 236 | |
Mat Whitney | 7540ded | 2012-06-22 12:02:10 -0700 | [diff] [blame] | 237 | .. php:method:: nice_date($bad_date = '', $format = FALSE) |
Derek Jones | 8ede1a2 | 2011-10-05 13:34:52 -0500 | [diff] [blame] | 238 | |
| 239 | :param integer $bad_date: The terribly formatted date-like string |
| 240 | :param string $format: Date format to return (same as php date function) |
| 241 | :returns: string |
| 242 | |
| 243 | Example |
| 244 | |
| 245 | :: |
| 246 | |
Andrey Andreev | c275b23 | 2012-06-15 16:13:17 +0300 | [diff] [blame] | 247 | $bad_date = '199605'; |
| 248 | // Should Produce: 1996-05-01 |
| 249 | $better_date = nice_date($bad_date, 'Y-m-d'); |
| 250 | |
| 251 | $bad_date = '9-11-2001'; |
| 252 | // Should Produce: 2001-09-11 |
| 253 | $better_date = nice_date($bad_date, 'Y-m-d'); |
Derek Jones | 8ede1a2 | 2011-10-05 13:34:52 -0500 | [diff] [blame] | 254 | |
| 255 | timespan() |
| 256 | ========== |
| 257 | |
| 258 | Formats a unix timestamp so that is appears similar to this |
Derek Jones | 8ede1a2 | 2011-10-05 13:34:52 -0500 | [diff] [blame] | 259 | :: |
| 260 | |
| 261 | 1 Year, 10 Months, 2 Weeks, 5 Days, 10 Hours, 16 Minutes |
| 262 | |
| 263 | The first parameter must contain a Unix timestamp. The second parameter |
| 264 | must contain a timestamp that is greater that the first timestamp. If |
Mat Whitney | 7540ded | 2012-06-22 12:02:10 -0700 | [diff] [blame] | 265 | the second parameter empty, the current time will be used. The third |
| 266 | parameter is optional and limits the number of time units to display. |
| 267 | The most common purpose for this function is to show how much time has |
| 268 | elapsed from some point in time in the past to now. |
Derek Jones | 8ede1a2 | 2011-10-05 13:34:52 -0500 | [diff] [blame] | 269 | |
Roger Herbert | b81f909 | 2012-03-12 12:46:02 +0000 | [diff] [blame] | 270 | .. php:method:: timespan($seconds = 1, $time = '', $units = '') |
Derek Jones | 8ede1a2 | 2011-10-05 13:34:52 -0500 | [diff] [blame] | 271 | |
| 272 | :param integer $seconds: a number of seconds |
| 273 | :param string $time: Unix timestamp |
Roger Herbert | b81f909 | 2012-03-12 12:46:02 +0000 | [diff] [blame] | 274 | :param integer $units: a number of time units to display |
Derek Jones | 8ede1a2 | 2011-10-05 13:34:52 -0500 | [diff] [blame] | 275 | :returns: string |
| 276 | |
| 277 | Example |
| 278 | |
| 279 | :: |
| 280 | |
| 281 | $post_date = '1079621429'; |
| 282 | $now = time(); |
Roger Herbert | b81f909 | 2012-03-12 12:46:02 +0000 | [diff] [blame] | 283 | $units = 2; |
| 284 | echo timespan($post_date, $now, $units); |
Derek Jones | 8ede1a2 | 2011-10-05 13:34:52 -0500 | [diff] [blame] | 285 | |
| 286 | .. note:: The text generated by this function is found in the following language |
| 287 | file: language/<your_lang>/date_lang.php |
| 288 | |
| 289 | days_in_month() |
| 290 | =============== |
| 291 | |
| 292 | Returns the number of days in a given month/year. Takes leap years into |
Mat Whitney | 7540ded | 2012-06-22 12:02:10 -0700 | [diff] [blame] | 293 | account. |
Derek Jones | 8ede1a2 | 2011-10-05 13:34:52 -0500 | [diff] [blame] | 294 | |
| 295 | .. php:method:: days_in_month($month = 0, $year = '') |
| 296 | |
| 297 | :param integer $month: a numeric month |
| 298 | :param integer $year: a numeric year |
| 299 | :returns: integer |
| 300 | |
| 301 | Example |
| 302 | |
| 303 | :: |
| 304 | |
| 305 | echo days_in_month(06, 2005); |
| 306 | |
| 307 | If the second parameter is empty, the current year will be used. |
| 308 | |
Andrey Andreev | 2139ecd | 2012-01-11 23:58:50 +0200 | [diff] [blame] | 309 | date_range() |
| 310 | ============ |
| 311 | |
| 312 | Returns a list of dates within a specified period. |
| 313 | |
| 314 | .. php:method:: date_range($unix_start = '', $mixed = '', $is_unix = TRUE, $format = 'Y-m-d') |
| 315 | |
| 316 | :param integer $unix_start: UNIX timestamp of the range start date |
| 317 | :param integer $mixed: UNIX timestamp of the range end date or interval in days |
| 318 | :param boolean $is_unix: set to FALSE if $mixed is not a timestamp |
| 319 | :param string $format: output date format, same as in date() |
| 320 | :returns: array |
| 321 | |
| 322 | Example |
| 323 | |
| 324 | :: |
| 325 | |
| 326 | $range = date_range('2012-01-01', '2012-01-15'); |
| 327 | echo "First 15 days of 2012:"; |
| 328 | foreach ($range as $date) |
| 329 | { |
| 330 | echo $date."\n"; |
| 331 | } |
| 332 | |
Derek Jones | 8ede1a2 | 2011-10-05 13:34:52 -0500 | [diff] [blame] | 333 | timezones() |
| 334 | =========== |
| 335 | |
| 336 | Takes a timezone reference (for a list of valid timezones, see the |
| 337 | "Timezone Reference" below) and returns the number of hours offset from |
| 338 | UTC. |
| 339 | |
| 340 | .. php:method:: timezones($tz = '') |
| 341 | |
| 342 | :param string $tz: a numeric timezone |
| 343 | :returns: string |
| 344 | |
| 345 | Example |
| 346 | |
| 347 | :: |
| 348 | |
| 349 | echo timezones('UM5'); |
| 350 | |
| 351 | |
| 352 | This function is useful when used with `timezone_menu()`. |
| 353 | |
| 354 | timezone_menu() |
| 355 | =============== |
| 356 | |
| 357 | Generates a pull-down menu of timezones, like this one: |
| 358 | |
| 359 | |
| 360 | .. raw:: html |
| 361 | |
| 362 | <form action="#"> |
| 363 | <select name="timezones"> |
Kwaan Online | e90b684 | 2012-01-31 10:15:30 +0000 | [diff] [blame] | 364 | <option value='UM12'>(UTC -12:00) Baker/Howland Island</option> |
| 365 | <option value='UM11'>(UTC -11:00) Samoa Time Zone, Niue</option> |
| 366 | <option value='UM10'>(UTC -10:00) Hawaii-Aleutian Standard Time, Cook Islands, Tahiti</option> |
| 367 | <option value='UM95'>(UTC -9:30) Marquesas Islands</option> |
| 368 | <option value='UM9'>(UTC -9:00) Alaska Standard Time, Gambier Islands</option> |
| 369 | <option value='UM8'>(UTC -8:00) Pacific Standard Time, Clipperton Island</option> |
| 370 | <option value='UM7'>(UTC -7:00) Mountain Standard Time</option> |
| 371 | <option value='UM6'>(UTC -6:00) Central Standard Time</option> |
| 372 | <option value='UM5'>(UTC -5:00) Eastern Standard Time, Western Caribbean Standard Time</option> |
| 373 | <option value='UM45'>(UTC -4:30) Venezuelan Standard Time</option> |
| 374 | <option value='UM4'>(UTC -4:00) Atlantic Standard Time, Eastern Caribbean Standard Time</option> |
| 375 | <option value='UM35'>(UTC -3:30) Newfoundland Standard Time</option> |
| 376 | <option value='UM3'>(UTC -3:00) Argentina, Brazil, French Guiana, Uruguay</option> |
| 377 | <option value='UM2'>(UTC -2:00) South Georgia/South Sandwich Islands</option> |
| 378 | <option value='UM1'>(UTC -1:00) Azores, Cape Verde Islands</option> |
| 379 | <option value='UTC' selected='selected'>(UTC) Greenwich Mean Time, Western European Time</option> |
| 380 | <option value='UP1'>(UTC +1:00) Central European Time, West Africa Time</option> |
| 381 | <option value='UP2'>(UTC +2:00) Central Africa Time, Eastern European Time, Kaliningrad Time</option> |
| 382 | <option value='UP3'>(UTC +3:00) Moscow Time, East Africa Time</option> |
| 383 | <option value='UP35'>(UTC +3:30) Iran Standard Time</option> |
| 384 | <option value='UP4'>(UTC +4:00) Azerbaijan Standard Time, Samara Time</option> |
| 385 | <option value='UP45'>(UTC +4:30) Afghanistan</option> |
| 386 | <option value='UP5'>(UTC +5:00) Pakistan Standard Time, Yekaterinburg Time</option> |
| 387 | <option value='UP55'>(UTC +5:30) Indian Standard Time, Sri Lanka Time</option> |
| 388 | <option value='UP575'>(UTC +5:45) Nepal Time</option> |
| 389 | <option value='UP6'>(UTC +6:00) Bangladesh Standard Time, Bhutan Time, Omsk Time</option> |
| 390 | <option value='UP65'>(UTC +6:30) Cocos Islands, Myanmar</option> |
| 391 | <option value='UP7'>(UTC +7:00) Krasnoyarsk Time, Cambodia, Laos, Thailand, Vietnam</option> |
| 392 | <option value='UP8'>(UTC +8:00) Australian Western Standard Time, Beijing Time, Irkutsk Time</option> |
| 393 | <option value='UP875'>(UTC +8:45) Australian Central Western Standard Time</option> |
| 394 | <option value='UP9'>(UTC +9:00) Japan Standard Time, Korea Standard Time, Yakutsk Time</option> |
| 395 | <option value='UP95'>(UTC +9:30) Australian Central Standard Time</option> |
| 396 | <option value='UP10'>(UTC +10:00) Australian Eastern Standard Time, Vladivostok Time</option> |
| 397 | <option value='UP105'>(UTC +10:30) Lord Howe Island</option> |
| 398 | <option value='UP11'>(UTC +11:00) Magadan Time, Solomon Islands, Vanuatu</option> |
| 399 | <option value='UP115'>(UTC +11:30) Norfolk Island</option> |
| 400 | <option value='UP12'>(UTC +12:00) Fiji, Gilbert Islands, Kamchatka Time, New Zealand Standard Time</option> |
| 401 | <option value='UP1275'>(UTC +12:45) Chatham Islands Standard Time</option> |
| 402 | <option value='UP13'>(UTC +13:00) Phoenix Islands Time, Tonga</option> |
| 403 | <option value='UP14'>(UTC +14:00) Line Islands</option> |
Derek Jones | 8ede1a2 | 2011-10-05 13:34:52 -0500 | [diff] [blame] | 404 | </select> |
| 405 | </form> |
| 406 | |
| 407 | |
| 408 | This menu is useful if you run a membership site in which your users are |
| 409 | allowed to set their local timezone value. |
| 410 | |
| 411 | The first parameter lets you set the "selected" state of the menu. For |
| 412 | example, to set Pacific time as the default you will do this |
| 413 | |
Mat Whitney | 7540ded | 2012-06-22 12:02:10 -0700 | [diff] [blame] | 414 | .. php:method:: timezone_menu($default = 'UTC', $class = '', $name = 'timezones', $attributes = '') |
Derek Jones | 8ede1a2 | 2011-10-05 13:34:52 -0500 | [diff] [blame] | 415 | |
| 416 | :param string $default: timezone |
| 417 | :param string $class: classname |
| 418 | :param string $name: menu name |
Mat Whitney | 7540ded | 2012-06-22 12:02:10 -0700 | [diff] [blame] | 419 | :param mixed $attributes: attributes |
Derek Jones | 8ede1a2 | 2011-10-05 13:34:52 -0500 | [diff] [blame] | 420 | :returns: string |
| 421 | |
Mat Whitney | 7540ded | 2012-06-22 12:02:10 -0700 | [diff] [blame] | 422 | Example: |
Derek Jones | 8ede1a2 | 2011-10-05 13:34:52 -0500 | [diff] [blame] | 423 | |
| 424 | :: |
| 425 | |
| 426 | echo timezone_menu('UM8'); |
| 427 | |
| 428 | Please see the timezone reference below to see the values of this menu. |
| 429 | |
| 430 | The second parameter lets you set a CSS class name for the menu. |
| 431 | |
Mat Whitney | 7540ded | 2012-06-22 12:02:10 -0700 | [diff] [blame] | 432 | The fourth parameter lets you set one or more attributes on the generated select tag. |
| 433 | |
Derek Jones | 8ede1a2 | 2011-10-05 13:34:52 -0500 | [diff] [blame] | 434 | .. note:: The text contained in the menu is found in the following |
| 435 | language file: `language/<your_lang>/date_lang.php` |
| 436 | |
| 437 | |
| 438 | Timezone Reference |
| 439 | ================== |
| 440 | |
| 441 | The following table indicates each timezone and its location. |
| 442 | |
Kwaan Online | e90b684 | 2012-01-31 10:15:30 +0000 | [diff] [blame] | 443 | Note some of the location lists have been abridged for clarity and formatting. |
| 444 | |
Derek Jones | ce79be0 | 2012-06-25 23:23:46 -0700 | [diff] [blame] | 445 | =========== ===================================================================== |
| 446 | Time Zone Location |
| 447 | =========== ===================================================================== |
| 448 | UM2 (UTC - 12:00) Baker/Howland Island |
| 449 | UM1 (UTC - 11:00) Samoa Time Zone, Niue |
| 450 | UM0 (UTC - 10:00) Hawaii-Aleutian Standard Time, Cook Islands |
| 451 | UM95 (UTC - 09:30) Marquesas Islands |
| 452 | UM9 (UTC - 09:00) Alaska Standard Time, Gambier Islands |
| 453 | UM8 (UTC - 08:00) Pacific Standard Time, Clipperton Island |
| 454 | UM7 (UTC - 11:00) Mountain Standard Time |
| 455 | UM6 (UTC - 06:00) Central Standard Time |
| 456 | UM5 (UTC - 05:00) Eastern Standard Time, Western Caribbean |
| 457 | UM45 (UTC - 04:30) Venezuelan Standard Time |
| 458 | UM4 (UTC - 04:00) Atlantic Standard Time, Eastern Caribbean |
| 459 | UM35 (UTC - 03:30) Newfoundland Standard Time |
| 460 | UM3 (UTC - 03:00) Argentina, Brazil, French Guiana, Uruguay |
| 461 | UM2 (UTC - 02:00) South Georgia/South Sandwich Islands |
| 462 | UM (UTC -1:00) Azores, Cape Verde Islands |
| 463 | UTC (UTC) Greenwich Mean Time, Western European Time |
| 464 | UP1 (UTC +1:00) Central European Time, West Africa Time |
| 465 | UP2 (UTC +2:00) Central Africa Time, Eastern European Time |
| 466 | UP3 (UTC +3:00) Moscow Time, East Africa Time |
| 467 | UP35 (UTC +3:30) Iran Standard Time |
| 468 | UP4 (UTC +4:00) Azerbaijan Standard Time, Samara Time |
| 469 | UP45 (UTC +4:30) Afghanistan |
| 470 | UP5 (UTC +5:00) Pakistan Standard Time, Yekaterinburg Time |
| 471 | UP55 (UTC +5:30) Indian Standard Time, Sri Lanka Time |
| 472 | UP575 (UTC +5:45) Nepal Time |
| 473 | UP6 (UTC +6:00) Bangladesh Standard Time, Bhutan Time, Omsk Time |
| 474 | UP65 (UTC +6:30) Cocos Islands, Myanmar |
| 475 | UP7 (UTC +7:00) Krasnoyarsk Time, Cambodia, Laos, Thailand, Vietnam |
| 476 | UP8 (UTC +8:00) Australian Western Standard Time, Beijing Time |
| 477 | UP875 (UTC +8:45) Australian Central Western Standard Time |
| 478 | UP9 (UTC +9:00) Japan Standard Time, Korea Standard Time, Yakutsk |
| 479 | UP95 (UTC +9:30) Australian Central Standard Time |
| 480 | UP10 (UTC +10:00) Australian Eastern Standard Time, Vladivostok Time |
| 481 | UP105 (UTC +10:30) Lord Howe Island |
| 482 | UP11 (UTC +11:00) Magadan Time, Solomon Islands, Vanuatu |
| 483 | UP115 (UTC +11:30) Norfolk Island |
| 484 | UP12 (UTC +12:00) Fiji, Gilbert Islands, Kamchatka, New Zealand |
| 485 | UP1275 (UTC +12:45) Chatham Islands Standard Time |
| 486 | UP1 (UTC +13:00) Phoenix Islands Time, Tonga |
| 487 | UP14 (UTC +14:00) Line Islands |
Andrey Andreev | c60c2bd | 2012-10-05 22:46:28 +0300 | [diff] [blame] | 488 | =========== ===================================================================== |