поиск:

B.2. Date/Time Key Words

Table B-1 shows the tokens that are recognized as names of months.

Table B-1. Month Names

MonthAbbreviations
JanuaryJan
FebruaryFeb
MarchMar
AprilApr
May 
JuneJun
JulyJul
AugustAug
SeptemberSep, Sept
OctoberOct
NovemberNov
DecemberDec

Table B-2 shows the tokens that are recognized as names of days of the week.

Table B-2. Day of the Week Names

DayAbbreviations
SundaySun
MondayMon
TuesdayTue, Tues
WednesdayWed, Weds
ThursdayThu, Thur, Thurs
FridayFri
SaturdaySat

Table B-3 shows the tokens that serve various modifier purposes.

Table B-3. Date/Time Field Modifiers

IdentifierDescription
ABSTIMEIgnored
AMTime is before 12:00
ATIgnored
JULIAN, JD, JNext field is Julian Day
ONIgnored
PMTime is on or after 12:00
TNext field is time

The key word ABSTIME is ignored for historical reasons: In very old releases of PostgreSQL, invalid values of type abstime were emitted as Invalid Abstime. This is no longer the case however and this key word will likely be dropped in a future release.

Table B-4 shows the time zone abbreviations recognized by PostgreSQL in date/time input values. Note that these names are not necessarily used for date/time output — output is driven by the official timezone abbreviation(s) associated with the currently selected timezone parameter setting. (It is likely that future releases will make some use of timezone for input as well.)

The table is organized by time zone offset from UTC, rather than alphabetically. This is intended to facilitate matching local usage with recognized abbreviations for cases where these might differ.

Table B-4. Time Zone Abbreviations for Input

Time ZoneOffset from UTCDescription
NZDT+13:00New Zealand Daylight-Saving Time
IDLE+12:00International Date Line, East
NZST+12:00New Zealand Standard Time
NZT+12:00New Zealand Time
AESST+11:00Australia Eastern Summer Standard Time
ACSST+10:30Central Australia Summer Standard Time
CADT+10:30Central Australia Daylight-Saving Time
SADT+10:30South Australian Daylight-Saving Time
AEST+10:00Australia Eastern Standard Time
EAST+10:00East Australian Standard Time
GST+10:00Guam Standard Time, Russia zone 9
LIGT+10:00Melbourne, Australia
SAST+09:30South Australia Standard Time
CAST+09:30Central Australia Standard Time
AWSST+09:00Australia Western Summer Standard Time
JST+09:00Japan Standard Time, Russia zone 8
KST+09:00Korea Standard Time
MHT+09:00Kwajalein Time
WDT+09:00West Australian Daylight-Saving Time
MT+08:30Moluccas Time
AWST+08:00Australia Western Standard Time
CCT+08:00China Coastal Time
WADT+08:00West Australian Daylight-Saving Time
WST+08:00West Australian Standard Time
JT+07:30Java Time
ALMST+07:00Almaty Summer Time
WAST+07:00West Australian Standard Time
CXT+07:00Christmas (Island) Time
MMT+06:30Myanmar Time
ALMT+06:00Almaty Time
MAWT+06:00Mawson (Antarctica) Time
IOT+05:00Indian Chagos Time
MVT+05:00Maldives Island Time
TFT+05:00Kerguelen Time
AFT+04:30Afghanistan Time
EAST+04:00Antananarivo Summer Time
MUT+04:00Mauritius Island Time
RET+04:00Reunion Island Time
SCT+04:00Mahe Island Time
IRT, IT+03:30Iran Time
EAT+03:00Antananarivo, Comoro Time
BT+03:00Baghdad Time
EETDST+03:00Eastern Europe Daylight-Saving Time
HMT+03:00Hellas Mediterranean Time (?)
BDST+02:00British Double Summer Time
CEST+02:00Central European Summer Time
CETDST+02:00Central European Daylight-Saving Time
EET+02:00Eastern European Time, Russia zone 1
FWT+02:00French Winter Time
IST+02:00Israel Standard Time
MEST+02:00Middle European Summer Time
METDST+02:00Middle Europe Daylight-Saving Time
SST+02:00Swedish Summer Time
BST+01:00British Summer Time
CET+01:00Central European Time
DNT+01:00Dansk Normal Tid
FST+01:00French Summer Time
MET+01:00Middle European Time
MEWT+01:00Middle European Winter Time
MEZ+01:00Mitteleuropische Zeit
NOR+01:00Norway Standard Time
SET+01:00Seychelles Time
SWT+01:00Swedish Winter Time
WETDST+01:00Western European Daylight-Saving Time
GMT00:00Greenwich Mean Time
UT00:00Universal Time
UTC00:00Universal Coordinated Time
Z00:00Same as UTC
ZULU00:00Same as UTC
WET00:00Western European Time
WAT-01:00West Africa Time
FNST-01:00Fernando de Noronha Summer Time
FNT-02:00Fernando de Noronha Time
BRST-02:00Brasilia Summer Time
NDT-02:30Newfoundland Daylight-Saving Time
ADT-03:00Atlantic Daylight-Saving Time
AWT-03:00(unknown)
BRT-03:00Brasilia Time
NFT-03:30Newfoundland Standard Time
NST-03:30Newfoundland Standard Time
AST-04:00Atlantic Standard Time (Canada)
ACST-04:00Atlantic/Porto Acre Summer Time
EDT-04:00Eastern Daylight-Saving Time
ACT-05:00Atlantic/Porto Acre Standard Time
CDT-05:00Central Daylight-Saving Time
EST-05:00Eastern Standard Time
CST-06:00Central Standard Time
MDT-06:00Mountain Daylight-Saving Time
MST-07:00Mountain Standard Time
PDT-07:00Pacific Daylight-Saving Time
AKDT-08:00Alaska Daylight-Saving Time
PST-08:00Pacific Standard Time
YDT-08:00Yukon Daylight-Saving Time
AKST-09:00Alaska Standard Time
HDT-09:00Hawaii/Alaska Daylight-Saving Time
YST-09:00Yukon Standard Time
MART-09:30Marquesas Time
AHST-10:00Alaska/Hawaii Standard Time
HST-10:00Hawaii Standard Time
CAT-10:00Central Alaska Time
NT-11:00Nome Time
IDLW-12:00International Date Line, West

Australian Time Zones. There are three naming conflicts between Australian time zone names and time zone names commonly used in North and South America: ACST, CST, and EST. If the run-time option australian_timezones is set to true then ACST, CST, EST, and SAT are interpreted as Australian time zone names, as shown in Table B-5. If it is false (which is the default), then ACST, CST, and EST are taken as American time zone names, and SAT is interpreted as a noise word indicating Saturday.

Table B-5. Australian Time Zone Abbreviations for Input

Time ZoneOffset from UTCDescription
ACST+09:30Central Australia Standard Time
CST+10:30Australian Central Standard Time
EST+10:00Australian Eastern Standard Time
SAT+09:30South Australian Standard Time

Table B-6 shows the time zone names recognized by PostgreSQL as valid settings for the timezone parameter. Note that these names are conceptually as well as practically different from the names shown in Table B-4: most of these names imply a local daylight-savings time rule, whereas the former names each represent just a fixed offset from UTC.

In many cases there are several equivalent names for the same zone. These are listed on the same line. The table is primarily sorted by the name of the principal city of the zone.

Table B-6. Time Zone Names for Setting timezone

Time Zone
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmera
Africa/Bamako
Africa/Bangui
Africa/Banjul
Africa/Bissau
Africa/Blantyre
Africa/Brazzaville
Africa/Bujumbura
Africa/Cairo Egypt
Africa/Casablanca
Africa/Ceuta
Africa/Conakry
Africa/Dakar
Africa/Dar_es_Salaam
Africa/Djibouti
Africa/Douala
Africa/El_Aaiun
Africa/Freetown
Africa/Gaborone
Africa/Harare
Africa/Johannesburg
Africa/Kampala
Africa/Khartoum
Africa/Kigali
Africa/Kinshasa
Africa/Lagos
Africa/Libreville
Africa/Lome
Africa/Luanda
Africa/Lubumbashi
Africa/Lusaka
Africa/Malabo
Africa/Maputo
Africa/Maseru
Africa/Mbabane
Africa/Mogadishu
Africa/Monrovia
Africa/Nairobi
Africa/Ndjamena
Africa/Niamey
Africa/Nouakchott
Africa/Ouagadougou
Africa/Porto-Novo
Africa/Sao_Tome
Africa/Timbuktu
Africa/Tripoli Libya
Africa/Tunis
Africa/Windhoek
America/Adak America/Atka US/Aleutian
America/Anchorage SystemV/YST9YDT US/Alaska
America/Anguilla
America/Antigua
America/Araguaina
America/Aruba
America/Asuncion
America/Bahia
America/Barbados
America/Belem
America/Belize
America/Boa_Vista
America/Bogota
America/Boise
America/Buenos_Aires
America/Cambridge_Bay
America/Campo_Grande
America/Cancun
America/Caracas
America/Catamarca
America/Cayenne
America/Cayman
America/Chicago CST6CDT SystemV/CST6CDT US/Central
America/Chihuahua
America/Cordoba America/Rosario
America/Costa_Rica
America/Cuiaba
America/Curacao
America/Danmarkshavn
America/Dawson
America/Dawson_Creek
America/Denver MST7MDT SystemV/MST7MDT US/Mountain America/Shiprock Navajo
America/Detroit US/Michigan
America/Dominica
America/Edmonton Canada/Mountain
America/Eirunepe
America/El_Salvador
America/Ensenada America/Tijuana Mexico/BajaNorte
America/Fortaleza
America/Glace_Bay
America/Godthab
America/Goose_Bay
America/Grand_Turk
America/Grenada
America/Guadeloupe
America/Guatemala
America/Guayaquil
America/Guyana
America/Halifax Canada/Atlantic SystemV/AST4ADT
America/Havana Cuba
America/Hermosillo
America/Indiana/Indianapolis America/Indianapolis America/Fort_Wayne EST SystemV/EST5 US/East-Indiana
America/Indiana/Knox America/Knox_IN US/Indiana-Starke
America/Indiana/Marengo
America/Indiana/Vevay
America/Inuvik
America/Iqaluit
America/Jamaica Jamaica
America/Jujuy
America/Juneau
America/Kentucky/Louisville America/Louisville
America/Kentucky/Monticello
America/La_Paz
America/Lima
America/Los_Angeles PST8PDT SystemV/PST8PDT US/Pacific US/Pacific-New
America/Maceio
America/Managua
America/Manaus Brazil/West
America/Martinique
America/Mazatlan Mexico/BajaSur
America/Mendoza
America/Menominee
America/Merida
America/Mexico_City Mexico/General
America/Miquelon
America/Monterrey
America/Montevideo
America/Montreal
America/Montserrat
America/Nassau
America/New_York EST5EDT SystemV/EST5EDT US/Eastern
America/Nipigon
America/Nome
America/Noronha Brazil/DeNoronha
America/North_Dakota/Center
America/Panama
America/Pangnirtung
America/Paramaribo
America/Phoenix MST SystemV/MST7 US/Arizona
America/Port-au-Prince
America/Port_of_Spain
America/Porto_Acre America/Rio_Branco Brazil/Acre
America/Porto_Velho
America/Puerto_Rico SystemV/AST4
America/Rainy_River
America/Rankin_Inlet
America/Recife
America/Regina Canada/East-Saskatchewan Canada/Saskatchewan SystemV/CST6
America/Santiago Chile/Continental
America/Santo_Domingo
America/Sao_Paulo Brazil/East
America/Scoresbysund
America/St_Johns Canada/Newfoundland
America/St_Kitts
America/St_Lucia
America/St_Thomas America/Virgin
America/St_Vincent
America/Swift_Current
America/Tegucigalpa
America/Thule
America/Thunder_Bay
America/Toronto Canada/Eastern
America/Tortola
America/Vancouver Canada/Pacific
America/Whitehorse Canada/Yukon
America/Winnipeg Canada/Central
America/Yakutat
America/Yellowknife
Antarctica/Casey
Antarctica/Davis
Antarctica/DumontDUrville
Antarctica/Mawson
Antarctica/McMurdo Antarctica/South_Pole
Antarctica/Palmer
Antarctica/Rothera
Antarctica/Syowa
Antarctica/Vostok
Asia/Aden
Asia/Almaty
Asia/Amman
Asia/Anadyr
Asia/Aqtau
Asia/Aqtobe
Asia/Ashgabat Asia/Ashkhabad
Asia/Baghdad
Asia/Bahrain
Asia/Baku
Asia/Bangkok
Asia/Beirut
Asia/Bishkek
Asia/Brunei
Asia/Calcutta
Asia/Choibalsan
Asia/Chongqing Asia/Chungking
Asia/Colombo
Asia/Dacca Asia/Dhaka
Asia/Damascus
Asia/Dili
Asia/Dubai
Asia/Dushanbe
Asia/Gaza
Asia/Harbin
Asia/Hong_Kong Hongkong
Asia/Hovd
Asia/Irkutsk
Asia/Jakarta
Asia/Jayapura
Asia/Jerusalem Asia/Tel_Aviv Israel
Asia/Kabul
Asia/Kamchatka
Asia/Karachi
Asia/Kashgar
Asia/Katmandu
Asia/Krasnoyarsk
Asia/Kuala_Lumpur
Asia/Kuching
Asia/Kuwait
Asia/Macao Asia/Macau
Asia/Magadan
Asia/Makassar Asia/Ujung_Pandang
Asia/Manila
Asia/Muscat
Asia/Nicosia Europe/Nicosia
Asia/Novosibirsk
Asia/Omsk
Asia/Oral
Asia/Phnom_Penh
Asia/Pontianak
Asia/Pyongyang
Asia/Qatar
Asia/Qyzylorda
Asia/Rangoon
Asia/Riyadh
Asia/Riyadh87 Mideast/Riyadh87
Asia/Riyadh88 Mideast/Riyadh88
Asia/Riyadh89 Mideast/Riyadh89
Asia/Saigon
Asia/Sakhalin
Asia/Samarkand
Asia/Seoul ROK
Asia/Shanghai PRC
Asia/Singapore Singapore
Asia/Taipei ROC
Asia/Tashkent
Asia/Tbilisi
Asia/Tehran Iran
Asia/Thimbu Asia/Thimphu
Asia/Tokyo Japan
Asia/Ulaanbaatar Asia/Ulan_Bator
Asia/Urumqi
Asia/Vientiane
Asia/Vladivostok
Asia/Yakutsk
Asia/Yekaterinburg
Asia/Yerevan
Atlantic/Azores
Atlantic/Bermuda
Atlantic/Canary
Atlantic/Cape_Verde
Atlantic/Faeroe
Atlantic/Madeira
Atlantic/Reykjavik Iceland
Atlantic/South_Georgia
Atlantic/St_Helena
Atlantic/Stanley
Australia/ACT Australia/Canberra Australia/NSW Australia/Sydney
Australia/Adelaide Australia/South
Australia/Brisbane Australia/Queensland
Australia/Broken_Hill Australia/Yancowinna
Australia/Darwin Australia/North
Australia/Hobart Australia/Tasmania
Australia/LHI Australia/Lord_Howe
Australia/Lindeman
Australia/Melbourne Australia/Victoria
Australia/Perth Australia/West
CET
EET
Etc/GMT+1
Etc/GMT+2
Etc/GMT+3
Etc/GMT+4
Etc/GMT+5
Etc/GMT+6
Etc/GMT+7
Etc/GMT+8
Etc/GMT+9
Etc/GMT+10
Etc/GMT+11
Etc/GMT+12
Etc/GMT-1
Etc/GMT-2
Etc/GMT-3
Etc/GMT-4
Etc/GMT-5
Etc/GMT-6
Etc/GMT-7
Etc/GMT-8
Etc/GMT-9
Etc/GMT-10
Etc/GMT-11
Etc/GMT-12
Etc/GMT-13
Etc/GMT-14
Europe/Amsterdam
Europe/Andorra
Europe/Athens
Europe/Belfast
Europe/Belgrade Europe/Ljubljana Europe/Sarajevo Europe/Skopje Europe/Zagreb
Europe/Berlin
Europe/Brussels
Europe/Bucharest
Europe/Budapest
Europe/Chisinau Europe/Tiraspol
Europe/Copenhagen
Europe/Dublin Eire
Europe/Gibraltar
Europe/Helsinki
Europe/Istanbul Asia/Istanbul Turkey
Europe/Kaliningrad
Europe/Kiev
Europe/Lisbon Portugal
Europe/London GB GB-Eire
Europe/Luxembourg
Europe/Madrid
Europe/Malta
Europe/Minsk
Europe/Monaco
Europe/Moscow W-SU
Europe/Oslo Arctic/Longyearbyen Atlantic/Jan_Mayen
Europe/Paris
Europe/Prague Europe/Bratislava
Europe/Riga
Europe/Rome Europe/San_Marino Europe/Vatican
Europe/Samara
Europe/Simferopol
Europe/Sofia
Europe/Stockholm
Europe/Tallinn
Europe/Tirane
Europe/Uzhgorod
Europe/Vaduz
Europe/Vienna
Europe/Vilnius
Europe/Warsaw Poland
Europe/Zaporozhye
Europe/Zurich
Factory
GMT GMT+0 GMT-0 GMT0 Greenwich Etc/GMT Etc/GMT+0 Etc/GMT-0 Etc/GMT0 Etc/Greenwich
Indian/Antananarivo
Indian/Chagos
Indian/Christmas
Indian/Cocos
Indian/Comoro
Indian/Kerguelen
Indian/Mahe
Indian/Maldives
Indian/Mauritius
Indian/Mayotte
Indian/Reunion
MET
Pacific/Apia
Pacific/Auckland NZ
Pacific/Chatham NZ-CHAT
Pacific/Easter Chile/EasterIsland
Pacific/Efate
Pacific/Enderbury
Pacific/Fakaofo
Pacific/Fiji
Pacific/Funafuti
Pacific/Galapagos
Pacific/Gambier SystemV/YST9
Pacific/Guadalcanal
Pacific/Guam
Pacific/Honolulu HST SystemV/HST10 US/Hawaii
Pacific/Johnston
Pacific/Kiritimati
Pacific/Kosrae
Pacific/Kwajalein Kwajalein
Pacific/Majuro
Pacific/Marquesas
Pacific/Midway
Pacific/Nauru
Pacific/Niue
Pacific/Norfolk
Pacific/Noumea
Pacific/Pago_Pago Pacific/Samoa US/Samoa
Pacific/Palau
Pacific/Pitcairn SystemV/PST8
Pacific/Ponape
Pacific/Port_Moresby
Pacific/Rarotonga
Pacific/Saipan
Pacific/Tahiti
Pacific/Tarawa
Pacific/Tongatapu
Pacific/Truk
Pacific/Wake
Pacific/Wallis
Pacific/Yap
UCT Etc/UCT
UTC Universal Zulu Etc/UTC Etc/Universal Etc/Zulu
WET

In addition to the names listed in the table, PostgreSQL will accept time zone names of the form STDoffset or STDoffsetDST, where STD is a zone abbreviation, offset is a numeric offset in hours west from UTC, and DST is an optional daylight-savings zone abbreviation, assumed to stand for one hour ahead of the given offset. For example, if EST5EDT were not already a recognized zone name, it would be accepted and would be functionally equivalent to USA East Coast time. When a daylight-savings zone name is present, it is assumed to be used according to USA time zone rules, so this feature is of limited use outside North America. One should also be wary that this provision can lead to silently accepting bogus input, since there is no check on the reasonableness of the zone abbreviations. For example, SET TIMEZONE TO FOOBAR0 will work, leaving the system effectively using a rather peculiar abbreviation for GMT.

 
© 1997-2005 PHP Club Team
Rambler's Top100