ruby on rails - Invalid timezone -
just wondering why happens:
1.9.3-p327 :001 > time.now.zone => "yekt" 1.9.3-p327 :002 > time.now.in_time_zone("yekt") argumenterror: invalid timezone: yekt
yekt - timezone of city(yekaterinburg).
what hell going on? i'm setting project , trying fix tests, can't fix behavior. or can emulate current timezone(without changing code ideally)?
these available timezones.
{ "international date line west"=>"pacific/midway", "midway island"=>"pacific/midway", "american samoa"=>"pacific/pago_pago", "hawaii"=>"pacific/honolulu", "alaska"=>"america/juneau", "pacific time (us & canada)"=>"america/los_angeles", "tijuana"=>"america/tijuana", "mountain time (us & canada)"=>"america/denver", "arizona"=>"america/phoenix", "chihuahua"=>"america/chihuahua", "mazatlan"=>"america/mazatlan", "central time (us & canada)"=>"america/chicago", "saskatchewan"=>"america/regina", "guadalajara"=>"america/mexico_city", "mexico city"=>"america/mexico_city", "monterrey"=>"america/monterrey", "central america"=>"america/guatemala", "eastern time (us & canada)"=>"america/new_york", "indiana (east)"=>"america/indiana/indianapolis", "bogota"=>"america/bogota", "lima"=>"america/lima", "quito"=>"america/lima", "atlantic time (canada)"=>"america/halifax", "caracas"=>"america/caracas", "la paz"=>"america/la_paz", "santiago"=>"america/santiago", "newfoundland"=>"america/st_johns", "brasilia"=>"america/sao_paulo", "buenos aires"=>"america/argentina/buenos_aires", "montevideo"=>"america/montevideo", "georgetown"=>"america/guyana", "greenland"=>"america/godthab", "mid-atlantic"=>"atlantic/south_georgia", "azores"=>"atlantic/azores", "cape verde is."=>"atlantic/cape_verde", "dublin"=>"europe/dublin", "edinburgh"=>"europe/london", "lisbon"=>"europe/lisbon", "london"=>"europe/london", "casablanca"=>"africa/casablanca", "monrovia"=>"africa/monrovia", "utc"=>"etc/utc", "belgrade"=>"europe/belgrade", "bratislava"=>"europe/bratislava", "budapest"=>"europe/budapest", "ljubljana"=>"europe/ljubljana", "prague"=>"europe/prague", "sarajevo"=>"europe/sarajevo", "skopje"=>"europe/skopje", "warsaw"=>"europe/warsaw", "zagreb"=>"europe/zagreb", "brussels"=>"europe/brussels", "copenhagen"=>"europe/copenhagen", "madrid"=>"europe/madrid", "paris"=>"europe/paris", "amsterdam"=>"europe/amsterdam", "berlin"=>"europe/berlin", "bern"=>"europe/berlin", "rome"=>"europe/rome", "stockholm"=>"europe/stockholm", "vienna"=>"europe/vienna", "west central africa"=>"africa/algiers", "bucharest"=>"europe/bucharest", "cairo"=>"africa/cairo", "helsinki"=>"europe/helsinki", "kyiv"=>"europe/kiev", "riga"=>"europe/riga", "sofia"=>"europe/sofia", "tallinn"=>"europe/tallinn", "vilnius"=>"europe/vilnius", "athens"=>"europe/athens", "istanbul"=>"europe/istanbul", "minsk"=>"europe/minsk", "jerusalem"=>"asia/jerusalem", "harare"=>"africa/harare", "pretoria"=>"africa/johannesburg", "kaliningrad"=>"europe/kaliningrad", "moscow"=>"europe/moscow", "st. petersburg"=>"europe/moscow", "volgograd"=>"europe/volgograd", "samara"=>"europe/samara", "kuwait"=>"asia/kuwait", "riyadh"=>"asia/riyadh", "nairobi"=>"africa/nairobi", "baghdad"=>"asia/baghdad", "tehran"=>"asia/tehran", "abu dhabi"=>"asia/muscat", "muscat"=>"asia/muscat", "baku"=>"asia/baku", "tbilisi"=>"asia/tbilisi", "yerevan"=>"asia/yerevan", "kabul"=>"asia/kabul", "ekaterinburg"=>"asia/yekaterinburg", "islamabad"=>"asia/karachi", "karachi"=>"asia/karachi", "tashkent"=>"asia/tashkent", "chennai"=>"asia/kolkata", "kolkata"=>"asia/kolkata", "mumbai"=>"asia/kolkata", "new delhi"=>"asia/kolkata", "kathmandu"=>"asia/kathmandu", "astana"=>"asia/dhaka", "dhaka"=>"asia/dhaka", "sri jayawardenepura"=>"asia/colombo", "almaty"=>"asia/almaty", "novosibirsk"=>"asia/novosibirsk", "rangoon"=>"asia/rangoon", "bangkok"=>"asia/bangkok", "hanoi"=>"asia/bangkok", "jakarta"=>"asia/jakarta", "krasnoyarsk"=>"asia/krasnoyarsk", "beijing"=>"asia/shanghai", "chongqing"=>"asia/chongqing", "hong kong"=>"asia/hong_kong", "urumqi"=>"asia/urumqi", "kuala lumpur"=>"asia/kuala_lumpur", "singapore"=>"asia/singapore", "taipei"=>"asia/taipei", "perth"=>"australia/perth", "irkutsk"=>"asia/irkutsk", "ulaanbaatar"=>"asia/ulaanbaatar", "seoul"=>"asia/seoul", "osaka"=>"asia/tokyo", "sapporo"=>"asia/tokyo", "tokyo"=>"asia/tokyo", "yakutsk"=>"asia/yakutsk", "darwin"=>"australia/darwin", "adelaide"=>"australia/adelaide", "canberra"=>"australia/melbourne", "melbourne"=>"australia/melbourne", "sydney"=>"australia/sydney", "brisbane"=>"australia/brisbane", "hobart"=>"australia/hobart", "vladivostok"=>"asia/vladivostok", "guam"=>"pacific/guam", "port moresby"=>"pacific/port_moresby", "magadan"=>"asia/magadan", "srednekolymsk"=>"asia/srednekolymsk", "solomon is."=>"pacific/guadalcanal", "new caledonia"=>"pacific/noumea", "fiji"=>"pacific/fiji", "kamchatka"=>"asia/kamchatka", "marshall is."=>"pacific/majuro", "auckland"=>"pacific/auckland", "wellington"=>"pacific/auckland", "nuku'alofa"=>"pacific/tongatapu", "tokelau is."=>"pacific/fakaofo", "chatham is."=>"pacific/chatham", "samoa"=>"pacific/apia" }
http://api.rubyonrails.org/classes/activesupport/timezone.html
Comments
Post a Comment