Jon Nylander avatar Jon Nylander committed 006275f

More fixes for issue #3.

Comments (0)

Files changed (1)

detect_timezone.js

  */
 olson.timezones = {
 	'-720,0'   : new TimeZone('-12:00','Etc/GMT+12', false),
-	'-660,0'   : new TimeZone('-11:00','Pacific/Midway', false),
+	'-660,0'   : new TimeZone('-11:00','Pacific/Pago_Pago', false),
+	'-600,1'   : new TimeZone('-11:00','America/Adak',true),
 	'-660,1,s' : new TimeZone('-11:00','Pacific/Apia', true),
 	'-600,0'   : new TimeZone('-10:00','Pacific/Honolulu', false),
+	'-570,0'   : new TimeZone('-10:30','Pacific/Marquesas',false),
+	'-540,0'   : new TimeZone('-09:00','Pacific/Gambier',false),
 	'-540,1'   : new TimeZone('-09:00','America/Anchorage', true),
-	'-480,1'   : new TimeZone('-08:00','America/Vancouver', true),
+	'-480,1'   : new TimeZone('-08:00','America/Los_Angeles', true),
+	'-480,0'   : new TimeZone('-08:00','Pacific/Pitcairn',false),
 	'-420,0'   : new TimeZone('-07:00','America/Phoenix', false),
 	'-420,1'   : new TimeZone('-07:00','America/Denver', true),
-	'-360,0'   : new TimeZone('-06:00','America/Regina', false),
+	'-360,0'   : new TimeZone('-06:00','America/Guatemala', false),
 	'-360,1'   : new TimeZone('-06:00','America/Chicago', true),
-	'-300,0'   : new TimeZone('-05:00','America/Atikokan', false),
+	'-360,1,s' : new TimeZone('-06:00','Pacific/Easter',true),
+	'-300,0'   : new TimeZone('-05:00','America/Bogota', false),
 	'-300,1'   : new TimeZone('-05:00','America/New_York', true),
 	'-270,0'   : new TimeZone('-04:30','America/Caracas', false),
 	'-240,1'   : new TimeZone('-04:00','America/Halifax', true),
-	'-240,0'   : new TimeZone('-04:00','America/Manaus', false),
+	'-240,0'   : new TimeZone('-04:00','America/Santo_Domingo', false),
 	'-240,1,s' : new TimeZone('-04:00','America/Asuncion', true),
 	'-210,1'   : new TimeZone('-03:30','America/St_Johns', true),
 	'-180,1'   : new TimeZone('-03:00','America/Godthab', true),
 	'-120,1'   : new TimeZone('-02:00','Etc/GMT+2', true),
 	'-60,1'    : new TimeZone('-01:00','Atlantic/Azores', true),
 	'-60,0'    : new TimeZone('-01:00','Atlantic/Cape_Verde', false),
-	'0,0'      : new TimeZone('00:00','Atlantic/Reykjavik', false),
+	'0,0'      : new TimeZone('00:00','Africa/Casablanca', false),
 	'0,1'      : new TimeZone('00:00','Europe/London', true),
 	'60,1'     : new TimeZone('+01:00','Europe/Berlin', true),
-	'60,0'     : new TimeZone('+01:00','Africa/Porto-Novo', false),
+	'60,0'     : new TimeZone('+01:00','Africa/Lagos', false),
 	'60,1,s'   : new TimeZone('+01:00','Africa/Windhoek',true),
 	'120,1'    : new TimeZone('+02:00','Asia/Beirut', true),
-	'120,0'    : new TimeZone('+02:00','Africa/Harare', false),
+	'120,0'    : new TimeZone('+02:00','Africa/Johannesburg', false),
 	'180,1'    : new TimeZone('+03:00','Europe/Moscow', true),
 	'180,0'    : new TimeZone('+03:00','Asia/Baghdad', false),
 	'210,1'    : new TimeZone('+03:30','Asia/Tehran', true),
 	'330,0'    : new TimeZone('+05:30','Asia/Kolkata', false),
 	'345,0'    : new TimeZone('+05:45','Asia/Kathmandu', false),
 	'360,0'    : new TimeZone('+06:00','Asia/Dhaka', false),
-	'360,1'    : new TimeZone('+06:00','Asia/Novosibirsk', true),
+	'360,1'    : new TimeZone('+06:00','Asia/Omsk', true),
 	'390,0'    : new TimeZone('+06:30','Asia/Rangoon', false),
 	'420,1'    : new TimeZone('+07:00','Asia/Krasnoyarsk', true),
-	'420,0'    : new TimeZone('+07:00','Asia/Bangkok', false),
+	'420,0'    : new TimeZone('+07:00','Asia/Jakarta', false),
 	'480,0'    : new TimeZone('+08:00','Asia/Shanghai', false),
 	'480,1'    : new TimeZone('+08:00','Asia/Irkutsk', true),
 	'525,1,s'  : new TimeZone('+08:45','Australia/Eucla', true),
 	'540,1'    : new TimeZone('+09:00','Asia/Yakutsk', true),
-	'540,0'    : new TimeZone('+09:00','Asia/Seoul', false),
+	'540,0'    : new TimeZone('+09:00','Asia/Tokyo', false),
 	'570,0'    : new TimeZone('+09:30','Australia/Darwin', false),
 	'570,1,s'  : new TimeZone('+09:30','Australia/Adelaide', true),
 	'600,0'    : new TimeZone('+10:00','Australia/Brisbane', false),
 	'600,1'	   : new TimeZone('+10:00','Asia/Vladivostok', true),
-	'600,1,s'  : new TimeZone('+10:00','Australia/Melbourne', true),
-	'660,1'    : new TimeZone('+11:00','Asia/Magadan', true),
-	'660,0'    : new TimeZone('+11:00','Pacific/Pohnpei', false),
+	'600,1,s'  : new TimeZone('+10:00','Australia/Sydney', true),
+	'630,1,s'  : new TimeZone('+10:30','Australia/Lord_Howe', true),
+	'660,1'    : new TimeZone('+11:00','Asia/Kamchatka', true),
+	'660,0'    : new TimeZone('+11:00','Pacific/Noumea', false),
+	'690,0'    : new TimeZone('+11:30','Pacific/Norfolk', false),
 	'720,1,s'  : new TimeZone('+12:00','Pacific/Auckland', true),
-	'720,0'    : new TimeZone('+12:00','Pacific/Wake', false),
+	'720,0'    : new TimeZone('+12:00','Pacific/Tarawa', false),
 	'765,1,s'  : new TimeZone('+12:45','Pacific/Chatham', true),
-	'780,0'    : new TimeZone('+13:00','Pacific/Tongatapu', false)		
+	'780,0'    : new TimeZone('+13:00','Pacific/Tongatapu', false),
+	'840,0'    : new TimeZone('+14:00','Pacific/Kiritimati', false)
 }
 
 /**
  */
 olson.dst_start_dates = {
 	'America/Denver' : new Date(2011, 2, 13, 3, 0, 0, 0),
-	'America/Chihuahua' : new Date(2011, 3, 3, 3, 0, 0, 0),
+	'America/Mazatlan' : new Date(2011, 3, 3, 3, 0, 0, 0),
 	'America/Chicago' : new Date(2011, 2, 13, 3, 0, 0, 0),
 	'America/Mexico_City' : new Date(2011, 3, 3, 3, 0, 0, 0),
+	'Atlantic/Stanley' : new Date(2011, 8, 4, 7, 0, 0, 0),
 	'America/Asuncion' : new Date(2011, 9, 2, 3, 0, 0, 0),
 	'America/Santiago' : new Date(2011, 9, 9, 3, 0, 0, 0),
-	'America/Cuiaba' : new Date(2011, 9, 16, 5, 0, 0, 0),
+	'America/Campo_Grande' : new Date(2011, 9, 16, 5, 0, 0, 0),
 	'America/Montevideo' : new Date(2011, 9, 2, 2, 0, 0, 0),
 	'America/Sao_Paolo' : new Date(2011, 9, 16, 5, 0, 0, 0),
+	'America/Los_Angeles' : new Date(2011, 2, 13, 8, 0, 0, 0),
+	'America/Santa_Isabel' : new Date(2011, 3, 5, 8, 0, 0, 0),
+	'America/Havana' : new Date(2011, 2, 12, 20, 0, 0, 0),
+	'America/New_York' : new Date(2011, 2, 13, 7, 0, 0, 0),
+	'Asia/Gaza' : new Date(2011, 2, 26, 23, 0, 0, 0),
 	'Asia/Beirut' : new Date(2011, 2, 27, 4, 0, 0, 0),
 	'Europe/Minsk' : new Date(2011, 2, 27, 6, 0, 0, 0),
 	'Europe/Istanbul' : new Date(2011, 2, 27, 7, 0, 0, 0),
-	'Asia/Amman' : new Date(2011, 3, 1, 4, 0, 0, 0),
+	'Asia/Damascus' : new Date(2011, 3, 1, 4, 0, 0, 0),
 	'Asia/Jerusalem' : new Date(2011, 3, 1, 6, 0, 0, 0),
 	'Africa/Cairo' : new Date(2011, 3, 29, 4, 0, 0, 0),
 	'Asia/Yerevan' : new Date(2011, 2, 27, 8, 0, 0, 0),
  * starts for the regions.
  */
 olson.ambiguity_list = {
-	'America/Denver' : ['America/Denver','America/Chihuahua'],
+	'America/Denver' : ['America/Denver','America/Mazatlan'],
 	'America/Chicago' : ['America/Chicago','America/Mexico_City'],
-	'America/Asuncion' : ['America/Asuncion', 'America/Santiago','America/Cuiaba'],
+	'America/Asuncion' : ['Atlantic/Stanley', 'America/Asuncion', 'America/Santiago','America/Campo_Grande'],
 	'America/Montevideo' : ['America/Montevideo', 'America/Sao_Paolo'],
-	'Asia/Beirut' : ['Asia/Beirut', 'Europe/Minsk', 'Europe/Istanbul', 'Asia/Amman', 'Asia/Jerusalem','Africa/Cairo'],
+	'Asia/Beirut' : ['Asia/Gaza','Asia/Beirut', 'Europe/Minsk', 'Europe/Istanbul', 'Asia/Damascus', 'Asia/Jerusalem','Africa/Cairo'],
 	'Asia/Yerevan' : ['Asia/Yerevan', 'Asia/Baku'],
-	'Pacific/Auckland' : ['Pacific/Auckland', 'Pacific/Fiji']
+	'Pacific/Auckland' : ['Pacific/Auckland', 'Pacific/Fiji'],
+	'America/Los_Angeles' : ['America/Los_Angeles', 'America/Santa_Isabel'],
+	'America/New_York' : ['America/Havana','America/New_York']
 }
 
 /**
  * Checks if a timezone has possible ambiguities. I.e timezones that are similar.
  * 
  * If the preliminary scan determines that we're in America/Denver. We double check
- * here that we're really there and not in America/Chihuahua.
+ * here that we're really there and not in America/Mazatlan.
  * 
  * This is done by checking known dates for when daylight savings start for different
  * timezones.
 	
 	for (var i = 0; i < length; i++) {
 		var tz = local_ambiguity_list[i]
-		
+
 		if (date_is_dst(olson.dst_start_dates[tz])) {
 			this.olson_tz = tz;
 			return;
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.