Index: openacs-4/packages/timezones/cvs-add =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/timezones/Attic/cvs-add,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/timezones/cvs-add 19 Aug 2001 23:08:47 -0000 1.1 @@ -0,0 +1,3 @@ +#!/bin/sh +cvs -z3 -d:pserver:jong@openacs.org:/cvsroot add * + Index: openacs-4/packages/timezones/timezones.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/timezones/Attic/timezones.info,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/timezones/timezones.info 19 Aug 2001 23:08:47 -0000 1.1 @@ -0,0 +1,31 @@ + + + + + Timezone + Timezones + f + t + + + + oracle + postgresql + + Jon Griffin + This is timezone data. + Mayuli Enterprises LLC + This package is all timezone data for OpenACS. It requires acs-reference to be installed. + + + + + + + + + + + + + Index: openacs-4/packages/timezones/sql/oracle/timezone-data.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/timezones/sql/oracle/Attic/timezone-data.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/timezones/sql/oracle/timezone-data.sql 19 Aug 2001 23:09:54 -0000 1.1 @@ -0,0 +1,532 @@ +-- packages/acs-reference/sql/oracle/timezone-data.sql +-- +-- Part of the timezone reference data +-- +-- @cvs-id $Id: timezone-data.sql,v 1.1 2001/08/19 23:09:54 jong Exp $ + +begin + timezone.new('Africa/Abidjan','+000000'); + timezone.new('Africa/Accra','+000000'); + timezone.new('Africa/Addis_Ababa','+030000'); + timezone.new('Africa/Algiers','+010000'); + timezone.new('Africa/Asmera','+030000'); + timezone.new('Africa/Bamako','+000000'); + timezone.new('Africa/Bangui','+010000'); + timezone.new('Africa/Banjul','+000000'); + timezone.new('Africa/Bissau','+000000'); + timezone.new('Africa/Blantyre','+020000'); + timezone.new('Africa/Brazzaville','+010000'); + timezone.new('Africa/Bujumbura','+020000'); + timezone.new('Africa/Cairo','+020000'); + timezone.new('Africa/Casablanca','+000000'); + timezone.new('Africa/Ceuta','+010000'); + timezone.new('Africa/Conakry','+000000'); + timezone.new('Africa/Dakar','+000000'); + timezone.new('Africa/Dar_es_Salaam','+030000'); + timezone.new('Africa/Djibouti','+030000'); + timezone.new('Africa/Douala','+010000'); + timezone.new('Africa/El_Aaiun','+000000'); + timezone.new('Africa/Freetown','+000000'); + timezone.new('Africa/Gaborone','+020000'); + timezone.new('Africa/Harare','+020000'); + timezone.new('Africa/Johannesburg','+020000'); + timezone.new('Africa/Kampala','+030000'); + timezone.new('Africa/Khartoum','+030000'); + timezone.new('Africa/Kigali','+020000'); + timezone.new('Africa/Kinshasa','+010000'); + timezone.new('Africa/Lagos','+010000'); + timezone.new('Africa/Libreville','+010000'); + timezone.new('Africa/Lome','+000000'); + timezone.new('Africa/Luanda','+010000'); + timezone.new('Africa/Lubumbashi','+020000'); + timezone.new('Africa/Lusaka','+020000'); + timezone.new('Africa/Malabo','+010000'); + timezone.new('Africa/Maputo','+020000'); + timezone.new('Africa/Maseru','+020000'); + timezone.new('Africa/Mbabane','+020000'); + timezone.new('Africa/Mogadishu','+030000'); + timezone.new('Africa/Monrovia','+000000'); + timezone.new('Africa/Nairobi','+030000'); + timezone.new('Africa/Ndjamena','+010000'); + timezone.new('Africa/Niamey','+010000'); + timezone.new('Africa/Nouakchott','+000000'); + timezone.new('Africa/Ouagadougou','+000000'); + timezone.new('Africa/Porto-Novo','+010000'); + timezone.new('Africa/Sao_Tome','+000000'); + timezone.new('Africa/Timbuktu','+000000'); + timezone.new('Africa/Tripoli','+020000'); + timezone.new('Africa/Tunis','+010000'); + timezone.new('Africa/Windhoek','+020000'); + timezone.new('America/Adak','-100000'); + timezone.new('America/Anchorage','-090000'); + timezone.new('America/Anguilla','-040000'); + timezone.new('America/Antigua','-040000'); + timezone.new('America/Araguaina','-020000'); + timezone.new('America/Aruba','-040000'); + timezone.new('America/Asuncion','-030000'); + timezone.new('America/Atka','-100000'); + timezone.new('America/Barbados','-040000'); + timezone.new('America/Belem','-030000'); + timezone.new('America/Belize','-060000'); + timezone.new('America/Boa_Vista','-030000'); + timezone.new('America/Bogota','-050000'); + timezone.new('America/Boise','-070000'); + timezone.new('America/Buenos_Aires','-030000'); + timezone.new('America/Cambridge_Bay','-060000'); + timezone.new('America/Cancun','-060000'); + timezone.new('America/Caracas','-040000'); + timezone.new('America/Catamarca','-030000'); + timezone.new('America/Cayenne','-030000'); + timezone.new('America/Cayman','-050000'); + timezone.new('America/Chicago','-060000'); + timezone.new('America/Chihuahua','-070000'); + timezone.new('America/Cordoba','-030000'); + timezone.new('America/Costa_Rica','-060000'); + timezone.new('America/Cuiaba','-030000'); + timezone.new('America/Curacao','-040000'); + timezone.new('America/Dawson','-080000'); + timezone.new('America/Dawson_Creek','-070000'); + timezone.new('America/Denver','-070000'); + timezone.new('America/Detroit','-050000'); + timezone.new('America/Dominica','-040000'); + timezone.new('America/Edmonton','-070000'); + timezone.new('America/El_Salvador','-060000'); + timezone.new('America/Ensenada','-080000'); + timezone.new('America/Fort_Wayne','-050000'); + timezone.new('America/Fortaleza','-020000'); + timezone.new('America/Glace_Bay','-040000'); + timezone.new('America/Godthab','-030000'); + timezone.new('America/Goose_Bay','-040000'); + timezone.new('America/Grand_Turk','-050000'); + timezone.new('America/Grenada','-040000'); + timezone.new('America/Guadeloupe','-040000'); + timezone.new('America/Guatemala','-060000'); + timezone.new('America/Guayaquil','-050000'); + timezone.new('America/Guyana','-040000'); + timezone.new('America/Halifax','-040000'); + timezone.new('America/Havana','-050000'); + timezone.new('America/Hermosillo','-070000'); + timezone.new('America/Indiana/Indianapolis','-050000'); + timezone.new('America/Indiana/Knox','-050000'); + timezone.new('America/Indiana/Marengo','-050000'); + timezone.new('America/Indiana/Vevay','-050000'); + timezone.new('America/Indianapolis','-050000'); + timezone.new('America/Inuvik','-070000'); + timezone.new('America/Iqaluit','-060000'); + timezone.new('America/Jamaica','-050000'); + timezone.new('America/Jujuy','-030000'); + timezone.new('America/Juneau','-090000'); + timezone.new('America/Kentucky/Louisville','-050000'); + timezone.new('America/Kentucky/Monticello','-050000'); + timezone.new('America/Knox_IN','-050000'); + timezone.new('America/La_Paz','-040000'); + timezone.new('America/Lima','-050000'); + timezone.new('America/Los_Angeles','-080000'); + timezone.new('America/Louisville','-050000'); + timezone.new('America/Maceio','-020000'); + timezone.new('America/Managua','-060000'); + timezone.new('America/Manaus','-040000'); + timezone.new('America/Martinique','-040000'); + timezone.new('America/Mazatlan','-070000'); + timezone.new('America/Mendoza','-030000'); + timezone.new('America/Menominee','-060000'); + timezone.new('America/Merida','-060000'); + timezone.new('America/Mexico_City','-060000'); + timezone.new('America/Miquelon','-030000'); + timezone.new('America/Monterrey','-060000'); + timezone.new('America/Montevideo','-030000'); + timezone.new('America/Montreal','-050000'); + timezone.new('America/Montserrat','-040000'); + timezone.new('America/Nassau','-050000'); + timezone.new('America/New_York','-050000'); + timezone.new('America/Nipigon','-050000'); + timezone.new('America/Nome','-090000'); + timezone.new('America/Noronha','-020000'); + timezone.new('America/Panama','-050000'); + timezone.new('America/Pangnirtung','-060000'); + timezone.new('America/Paramaribo','-030000'); + timezone.new('America/Phoenix','-070000'); + timezone.new('America/Port-au-Prince','-050000'); + timezone.new('America/Port_of_Spain','-040000'); + timezone.new('America/Porto_Acre','-050000'); + timezone.new('America/Porto_Velho','-040000'); + timezone.new('America/Puerto_Rico','-040000'); + timezone.new('America/Rainy_River','-060000'); + timezone.new('America/Rankin_Inlet','-060000'); + timezone.new('America/Regina','-060000'); + timezone.new('America/Rosario','-030000'); + timezone.new('America/Santiago','-030000'); + timezone.new('America/Santo_Domingo','-040000'); + timezone.new('America/Sao_Paulo','-020000'); + timezone.new('America/Scoresbysund','-010000'); + timezone.new('America/Shiprock','-070000'); + timezone.new('America/St_Johns','-0330'); + timezone.new('America/St_Kitts','-040000'); + timezone.new('America/St_Lucia','-040000'); + timezone.new('America/St_Thomas','-040000'); + timezone.new('America/St_Vincent','-040000'); + timezone.new('America/Swift_Current','-060000'); + timezone.new('America/Tegucigalpa','-060000'); + timezone.new('America/Thule','-040000'); + timezone.new('America/Thunder_Bay','-050000'); + timezone.new('America/Tijuana','-080000'); + timezone.new('America/Tortola','-040000'); + timezone.new('America/Vancouver','-080000'); + timezone.new('America/Virgin','-040000'); + timezone.new('America/Whitehorse','-080000'); + timezone.new('America/Winnipeg','-060000'); + timezone.new('America/Yakutat','-090000'); + timezone.new('America/Yellowknife','-070000'); + timezone.new('Antarctica/Casey','+080000'); + timezone.new('Antarctica/Davis','+070000'); + timezone.new('Antarctica/DumontDUrville','+100000'); + timezone.new('Antarctica/Mawson','+060000'); + timezone.new('Antarctica/McMurdo','+130000'); + timezone.new('Antarctica/Palmer','-030000'); + timezone.new('Antarctica/South_Pole','+130000'); + timezone.new('Antarctica/Syowa','+030000'); + timezone.new('Arctic/Longyearbyen','+010000'); + timezone.new('Asia/Aden','+030000'); + timezone.new('Asia/Almaty','+060000'); + timezone.new('Asia/Amman','+020000'); + timezone.new('Asia/Anadyr','+120000'); + timezone.new('Asia/Aqtau','+040000'); + timezone.new('Asia/Aqtobe','+050000'); + timezone.new('Asia/Ashgabat','+050000'); + timezone.new('Asia/Ashkhabad','+050000'); + timezone.new('Asia/Baghdad','+030000'); + timezone.new('Asia/Bahrain','+030000'); + timezone.new('Asia/Baku','+040000'); + timezone.new('Asia/Bangkok','+070000'); + timezone.new('Asia/Beirut','+020000'); + timezone.new('Asia/Bishkek','+050000'); + timezone.new('Asia/Brunei','+080000'); + timezone.new('Asia/Calcutta','+0530'); + timezone.new('Asia/Chungking','+080000'); + timezone.new('Asia/Colombo','+060000'); + timezone.new('Asia/Dacca','+060000'); + timezone.new('Asia/Damascus','+020000'); + timezone.new('Asia/Dili','+080000'); + timezone.new('Asia/Dubai','+040000'); + timezone.new('Asia/Dushanbe','+050000'); + timezone.new('Asia/Gaza','+020000'); + timezone.new('Asia/Harbin','+080000'); + timezone.new('Asia/Hong_Kong','+080000'); + timezone.new('Asia/Hovd','+070000'); + timezone.new('Asia/Irkutsk','+080000'); + timezone.new('Asia/Istanbul','+020000'); + timezone.new('Asia/Jakarta','+070000'); + timezone.new('Asia/Jayapura','+090000'); + timezone.new('Asia/Jerusalem','+020000'); + timezone.new('Asia/Kabul','+0430'); + timezone.new('Asia/Kamchatka','+120000'); + timezone.new('Asia/Karachi','+050000'); + timezone.new('Asia/Kashgar','+080000'); + timezone.new('Asia/Katmandu','+0545'); + timezone.new('Asia/Krasnoyarsk','+070000'); + timezone.new('Asia/Kuala_Lumpur','+080000'); + timezone.new('Asia/Kuching','+080000'); + timezone.new('Asia/Kuwait','+030000'); + timezone.new('Asia/Macao','+080000'); + timezone.new('Asia/Magadan','+110000'); + timezone.new('Asia/Manila','+080000'); + timezone.new('Asia/Muscat','+040000'); + timezone.new('Asia/Nicosia','+020000'); + timezone.new('Asia/Novosibirsk','+060000'); + timezone.new('Asia/Omsk','+060000'); + timezone.new('Asia/Phnom_Penh','+070000'); + timezone.new('Asia/Pyongyang','+090000'); + timezone.new('Asia/Qatar','+030000'); + timezone.new('Asia/Rangoon','+0630'); + timezone.new('Asia/Riyadh','+030000'); + timezone.new('Asia/Riyadh87','+030704'); + timezone.new('Asia/Riyadh88','+030704'); + timezone.new('Asia/Riyadh89','+030704'); + timezone.new('Asia/Saigon','+070000'); + timezone.new('Asia/Samarkand','+050000'); + timezone.new('Asia/Seoul','+090000'); + timezone.new('Asia/Shanghai','+080000'); + timezone.new('Asia/Singapore','+080000'); + timezone.new('Asia/Taipei','+080000'); + timezone.new('Asia/Tashkent','+050000'); + timezone.new('Asia/Tbilisi','+040000'); + timezone.new('Asia/Tehran','+0330'); + timezone.new('Asia/Tel_Aviv','+020000'); + timezone.new('Asia/Thimbu','+060000'); + timezone.new('Asia/Thimphu','+060000'); + timezone.new('Asia/Tokyo','+090000'); + timezone.new('Asia/Ujung_Pandang','+080000'); + timezone.new('Asia/Ulaanbaatar','+080000'); + timezone.new('Asia/Ulan_Bator','+080000'); + timezone.new('Asia/Urumqi','+080000'); + timezone.new('Asia/Vientiane','+070000'); + timezone.new('Asia/Vladivostok','+100000'); + timezone.new('Asia/Yakutsk','+090000'); + timezone.new('Asia/Yekaterinburg','+050000'); + timezone.new('Asia/Yerevan','+040000'); + timezone.new('Atlantic/Azores','-010000'); + timezone.new('Atlantic/Bermuda','-040000'); + timezone.new('Atlantic/Canary','+000000'); + timezone.new('Atlantic/Cape_Verde','-010000'); + timezone.new('Atlantic/Faeroe','+000000'); + timezone.new('Atlantic/Jan_Mayen','-010000'); + timezone.new('Atlantic/Madeira','+000000'); + timezone.new('Atlantic/Reykjavik','+000000'); + timezone.new('Atlantic/South_Georgia','-020000'); + timezone.new('Atlantic/St_Helena','+000000'); + timezone.new('Atlantic/Stanley','-030000'); + timezone.new('Australia/ACT','+110000'); + timezone.new('Australia/Adelaide','+1030'); + timezone.new('Australia/Brisbane','+100000'); + timezone.new('Australia/Broken_Hill','+1030'); + timezone.new('Australia/Canberra','+110000'); + timezone.new('Australia/Darwin','+0930'); + timezone.new('Australia/Hobart','+110000'); + timezone.new('Australia/LHI','+110000'); + timezone.new('Australia/Lindeman','+100000'); + timezone.new('Australia/Lord_Howe','+110000'); + timezone.new('Australia/Melbourne','+110000'); + timezone.new('Australia/NSW','+110000'); + timezone.new('Australia/North','+0930'); + timezone.new('Australia/Perth','+080000'); + timezone.new('Australia/Queensland','+100000'); + timezone.new('Australia/South','+1030'); + timezone.new('Australia/Sydney','+110000'); + timezone.new('Australia/Tasmania','+110000'); + timezone.new('Australia/Victoria','+110000'); + timezone.new('Australia/West','+080000'); + timezone.new('Australia/Yancowinna','+1030'); + timezone.new('Brazil/Acre','-050000'); + timezone.new('Brazil/DeNoronha','-020000'); + timezone.new('Brazil/East','-020000'); + timezone.new('Brazil/West','-040000'); + timezone.new('CET','+010000'); + timezone.new('CST6CDT','-060000'); + timezone.new('Canada/Atlantic','-040000'); + timezone.new('Canada/Central','-060000'); + timezone.new('Canada/East-Saskatchewan','-060000'); + timezone.new('Canada/Eastern','-050000'); + timezone.new('Canada/Mountain','-070000'); + timezone.new('Canada/Newfoundland','-0330'); + timezone.new('Canada/Pacific','-080000'); + timezone.new('Canada/Saskatchewan','-060000'); + timezone.new('Canada/Yukon','-080000'); + timezone.new('Chile/Continental','-030000'); + timezone.new('Chile/EasterIsland','-050000'); + timezone.new('Cuba','-050000'); + timezone.new('EET','+020000'); + timezone.new('EST','-050000'); + timezone.new('EST5EDT','-050000'); + timezone.new('Egypt','+020000'); + timezone.new('Eire','+000000'); + timezone.new('Etc/GMT','+000000'); + timezone.new('Etc/GMT+0','+000000'); + timezone.new('Etc/GMT+1','-010000'); + timezone.new('Etc/GMT+10','-100000'); + timezone.new('Etc/GMT+11','-110000'); + timezone.new('Etc/GMT+12','-120000'); + timezone.new('Etc/GMT+2','-020000'); + timezone.new('Etc/GMT+3','-030000'); + timezone.new('Etc/GMT+4','-040000'); + timezone.new('Etc/GMT+5','-050000'); + timezone.new('Etc/GMT+6','-060000'); + timezone.new('Etc/GMT+7','-070000'); + timezone.new('Etc/GMT+8','-080000'); + timezone.new('Etc/GMT+9','-090000'); + timezone.new('Etc/GMT-0','+000000'); + timezone.new('Etc/GMT-1','+010000'); + timezone.new('Etc/GMT-10','+100000'); + timezone.new('Etc/GMT-11','+110000'); + timezone.new('Etc/GMT-12','+120000'); + timezone.new('Etc/GMT-13','+130000'); + timezone.new('Etc/GMT-14','+140000'); + timezone.new('Etc/GMT-2','+020000'); + timezone.new('Etc/GMT-3','+030000'); + timezone.new('Etc/GMT-4','+040000'); + timezone.new('Etc/GMT-5','+050000'); + timezone.new('Etc/GMT-6','+060000'); + timezone.new('Etc/GMT-7','+070000'); + timezone.new('Etc/GMT-8','+080000'); + timezone.new('Etc/GMT-9','+090000'); + timezone.new('Etc/GMT0','+000000'); + timezone.new('Etc/Greenwich','+000000'); + timezone.new('Etc/UCT','+000000'); + timezone.new('Etc/UTC','+000000'); + timezone.new('Etc/Universal','+000000'); + timezone.new('Etc/Zulu','+000000'); + timezone.new('Europe/Amsterdam','+010000'); + timezone.new('Europe/Andorra','+010000'); + timezone.new('Europe/Athens','+020000'); + timezone.new('Europe/Belfast','+000000'); + timezone.new('Europe/Belgrade','+010000'); + timezone.new('Europe/Berlin','+010000'); + timezone.new('Europe/Bratislava','+010000'); + timezone.new('Europe/Brussels','+010000'); + timezone.new('Europe/Bucharest','+020000'); + timezone.new('Europe/Budapest','+010000'); + timezone.new('Europe/Chisinau','+020000'); + timezone.new('Europe/Copenhagen','+010000'); + timezone.new('Europe/Dublin','+000000'); + timezone.new('Europe/Gibraltar','+010000'); + timezone.new('Europe/Helsinki','+020000'); + timezone.new('Europe/Istanbul','+020000'); + timezone.new('Europe/Kaliningrad','+020000'); + timezone.new('Europe/Kiev','+020000'); + timezone.new('Europe/Lisbon','+000000'); + timezone.new('Europe/Ljubljana','+010000'); + timezone.new('Europe/London','+000000'); + timezone.new('Europe/Luxembourg','+010000'); + timezone.new('Europe/Madrid','+010000'); + timezone.new('Europe/Malta','+010000'); + timezone.new('Europe/Minsk','+020000'); + timezone.new('Europe/Monaco','+010000'); + timezone.new('Europe/Moscow','+030000'); + timezone.new('Europe/Nicosia','+020000'); + timezone.new('Europe/Oslo','+010000'); + timezone.new('Europe/Paris','+010000'); + timezone.new('Europe/Prague','+010000'); + timezone.new('Europe/Riga','+020000'); + timezone.new('Europe/Rome','+010000'); + timezone.new('Europe/Samara','+040000'); + timezone.new('Europe/San_Marino','+010000'); + timezone.new('Europe/Sarajevo','+010000'); + timezone.new('Europe/Simferopol','+020000'); + timezone.new('Europe/Skopje','+010000'); + timezone.new('Europe/Sofia','+020000'); + timezone.new('Europe/Stockholm','+010000'); + timezone.new('Europe/Tallinn','+020000'); + timezone.new('Europe/Tirane','+010000'); + timezone.new('Europe/Tiraspol','+030000'); + timezone.new('Europe/Uzhgorod','+020000'); + timezone.new('Europe/Vaduz','+010000'); + timezone.new('Europe/Vatican','+010000'); + timezone.new('Europe/Vienna','+010000'); + timezone.new('Europe/Vilnius','+020000'); + timezone.new('Europe/Warsaw','+010000'); + timezone.new('Europe/Zagreb','+010000'); + timezone.new('Europe/Zaporozhye','+020000'); + timezone.new('Europe/Zurich','+010000'); + timezone.new('Factory','+000000'); + timezone.new('GB','+000000'); + timezone.new('GB-Eire','+000000'); + timezone.new('GMT','+000000'); + timezone.new('GMT+0','+000000'); + timezone.new('GMT-0','+000000'); + timezone.new('GMT0','+000000'); + timezone.new('Greenwich','+000000'); + timezone.new('HST','-100000'); + timezone.new('Hongkong','+080000'); + timezone.new('Iceland','+000000'); + timezone.new('Indian/Antananarivo','+030000'); + timezone.new('Indian/Chagos','+050000'); + timezone.new('Indian/Christmas','+070000'); + timezone.new('Indian/Cocos','+0630'); + timezone.new('Indian/Comoro','+030000'); + timezone.new('Indian/Kerguelen','+050000'); + timezone.new('Indian/Mahe','+040000'); + timezone.new('Indian/Maldives','+050000'); + timezone.new('Indian/Mauritius','+040000'); + timezone.new('Indian/Mayotte','+030000'); + timezone.new('Indian/Reunion','+040000'); + timezone.new('Iran','+0330'); + timezone.new('Israel','+020000'); + timezone.new('Jamaica','-050000'); + timezone.new('Japan','+090000'); + timezone.new('Kwajalein','+120000'); + timezone.new('Libya','+020000'); + timezone.new('MET','+010000'); + timezone.new('MST','-070000'); + timezone.new('MST7MDT','-070000'); + timezone.new('Mexico/BajaNorte','-080000'); + timezone.new('Mexico/BajaSur','-070000'); + timezone.new('Mexico/General','-060000'); + timezone.new('Mideast/Riyadh87','+030704'); + timezone.new('Mideast/Riyadh88','+030704'); + timezone.new('Mideast/Riyadh89','+030704'); + timezone.new('NZ','+130000'); + timezone.new('NZ-CHAT','+1345'); + timezone.new('Navajo','-070000'); + timezone.new('PRC','+080000'); + timezone.new('PST8PDT','-080000'); + timezone.new('Pacific/Apia','-110000'); + timezone.new('Pacific/Auckland','+130000'); + timezone.new('Pacific/Chatham','+1345'); + timezone.new('Pacific/Easter','-050000'); + timezone.new('Pacific/Efate','+110000'); + timezone.new('Pacific/Enderbury','+130000'); + timezone.new('Pacific/Fakaofo','-100000'); + timezone.new('Pacific/Fiji','+130000'); + timezone.new('Pacific/Funafuti','+120000'); + timezone.new('Pacific/Galapagos','-060000'); + timezone.new('Pacific/Gambier','-090000'); + timezone.new('Pacific/Guadalcanal','+110000'); + timezone.new('Pacific/Guam','+100000'); + timezone.new('Pacific/Honolulu','-100000'); + timezone.new('Pacific/Johnston','-100000'); + timezone.new('Pacific/Kiritimati','+140000'); + timezone.new('Pacific/Kosrae','+110000'); + timezone.new('Pacific/Kwajalein','+120000'); + timezone.new('Pacific/Majuro','+120000'); + timezone.new('Pacific/Marquesas','-0930'); + timezone.new('Pacific/Midway','-110000'); + timezone.new('Pacific/Nauru','+120000'); + timezone.new('Pacific/Niue','-110000'); + timezone.new('Pacific/Norfolk','+1130'); + timezone.new('Pacific/Noumea','+110000'); + timezone.new('Pacific/Pago_Pago','-110000'); + timezone.new('Pacific/Palau','+090000'); + timezone.new('Pacific/Pitcairn','-080000'); + timezone.new('Pacific/Ponape','+110000'); + timezone.new('Pacific/Port_Moresby','+100000'); + timezone.new('Pacific/Rarotonga','-100000'); + timezone.new('Pacific/Saipan','+100000'); + timezone.new('Pacific/Samoa','-110000'); + timezone.new('Pacific/Tahiti','-100000'); + timezone.new('Pacific/Tarawa','+120000'); + timezone.new('Pacific/Tongatapu','+140000'); + timezone.new('Pacific/Truk','+100000'); + timezone.new('Pacific/Wake','+120000'); + timezone.new('Pacific/Wallis','+120000'); + timezone.new('Pacific/Yap','+100000'); + timezone.new('Poland','+010000'); + timezone.new('Portugal','+000000'); + timezone.new('ROC','+080000'); + timezone.new('ROK','+090000'); + timezone.new('Singapore','+080000'); + timezone.new('SystemV/AST4','-040000'); + timezone.new('SystemV/AST4ADT','-040000'); + timezone.new('SystemV/CST6','-060000'); + timezone.new('SystemV/CST6CDT','-060000'); + timezone.new('SystemV/EST5','-050000'); + timezone.new('SystemV/EST5EDT','-050000'); + timezone.new('SystemV/HST10','-100000'); + timezone.new('SystemV/MST7','-070000'); + timezone.new('SystemV/MST7MDT','-070000'); + timezone.new('SystemV/PST8','-080000'); + timezone.new('SystemV/PST8PDT','-080000'); + timezone.new('SystemV/YST9','-090000'); + timezone.new('SystemV/YST9YDT','-090000'); + timezone.new('Turkey','+020000'); + timezone.new('UCT','+000000'); + timezone.new('US/Alaska','-090000'); + timezone.new('US/Aleutian','-100000'); + timezone.new('US/Arizona','-070000'); + timezone.new('US/Central','-060000'); + timezone.new('US/East-Indiana','-050000'); + timezone.new('US/Eastern','-050000'); + timezone.new('US/Hawaii','-100000'); + timezone.new('US/Indiana-Starke','-050000'); + timezone.new('US/Michigan','-050000'); + timezone.new('US/Mountain','-070000'); + timezone.new('US/Pacific','-080000'); + timezone.new('US/Pacific-New','-080000'); + timezone.new('US/Samoa','-110000'); + timezone.new('UTC','+000000'); + timezone.new('Universal','+000000'); + timezone.new('W-SU','+030000'); + timezone.new('WET','+000000'); + timezone.new('Zulu','+000000'); +end; +/ +show errors + Index: openacs-4/packages/timezones/sql/oracle/timezone-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/timezones/sql/oracle/Attic/timezone-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/timezones/sql/oracle/timezone-drop.sql 19 Aug 2001 23:09:54 -0000 1.1 @@ -0,0 +1,25 @@ +-- packages/acs-reference/sql/common/timezone-drop.sql +-- +-- Drop the timezone package +-- +-- @author jon@jongriffin.com +-- @created 2000-12-04 +-- @cvs-id $Id: timezone-drop.sql,v 1.1 2001/08/19 23:09:54 jong Exp $ + +declare + v_repository_id integer; +begin + select repository_id into v_repository_id + from acs_reference_repositories + where lower(table_name) = 'timezones'; + + acs_reference.delete(v_repository_id); +end; +/ + +drop sequence timezone_seq; +drop table timezone_rules; +drop table timezones; +drop package timezone; + + Index: openacs-4/packages/timezones/sql/oracle/timezones-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/timezones/sql/oracle/Attic/timezones-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/timezones/sql/oracle/timezones-create.sql 19 Aug 2001 23:09:54 -0000 1.1 @@ -0,0 +1,512 @@ +-- packages/acs-reference/sql/common/timezone-create.sql +-- +-- This package provides both the reference data for timezones and an +-- API for doing simple operations on timezones. The data provided is +-- a combination of the NIH timezone database and the Unix zoneinfo +-- database (conversion rules). +-- +-- @author jon@jongriffin.com +-- @author ron@arsdigita.com +-- @creation-date 2000-11-30 +-- @cvs-id $Id: timezones-create.sql,v 1.1 2001/08/19 23:09:54 jong Exp $ + +create sequence timezone_seq; + +-- Primary table for storing timezone names and standard offsets + +create table timezones ( + tz_id integer + constraint timezones_tz_id_pk primary key, + -- Unix-style TZ environment variable string, e.g. 'America/Los_Angeles' + tz varchar2(100) not null, + -- the standard time offset from UTC as (+-)hhmiss + gmt_offset char(7) not null +); + +-- add this table into the reference repository + +declare + v_id integer; +begin + v_id := acs_reference.new( + table_name => 'TIMEZONES', + package_name => 'TIMEZONE', + source => 'National Institute of Health (USA)', + source_url => 'ftp://elsie.nci.nih.gov/pub', + last_update => to_date('2000-08-21','YYYY-MM-DD'), + effective_date => sysdate + ); +commit; +end; +/ + +-- The following table stores the rules for converting between +-- local and UTC time. Each rule is specified by timezone, its +-- gmt_offset, and the times during which it applies. + +create table timezone_rules ( + -- which timezone does this rule apply to? + tz_id integer + constraint timezone_rules_tz_id_fk references timezones + on delete cascade, + -- abbreviation for local time, e.g. EST, EDT + abbrev varchar2(10), + -- UTC start/end time of this rule + utc_start date, + utc_end date, + -- local start/end time of this rule + local_start date, + local_end date, + -- GMT offset in fractions of day (UTC + gmt_offset = local) + gmt_offset number, + -- is Daylight Savings Time in effect for this rule? + isdst char(1) + constraint timezone_rules_isdist_ck + check (isdst in ('t','f')) +); + +create index timezone_rules_idx1 on timezone_rules(tz_id, utc_start, utc_end); +create index timezone_rules_idx2 on timezone_rules(tz_id, local_start, local_end); + +------------------------------------------------------------------------------- +-- TimeZone package +------------------------------------------------------------------------------- + +create or replace package timezone +as + procedure new ( + tz in timezones.tz%TYPE, + gmt_offset in timezones.gmt_offset%type + ); + + procedure delete ( + tz_id in timezones.tz_id%TYPE + ); + + function get_id ( + -- Gets the ID number of the given timezone + tz in timezones.tz%TYPE + ) return integer; + + procedure add_rule ( + -- Adds a new conversion rule to the timezone_rules database + tz in timezones.tz%TYPE, + abbrev in timezone_rules.abbrev%TYPE, + isdst in integer, + gmt_offset in integer, + utc_start in varchar, + utc_end in varchar, + local_start in varchar, + local_end in varchar + ); + + -- The following are the primary time conversion functions + + function utc_to_local ( + -- Returns utc_time converted to local time + tz in timezones.tz%TYPE, + utc_time in date + ) return date; + + function utc_to_local ( + -- Returns utc_time converted to local time + tz_id in timezones.tz_id%TYPE, + utc_time in date + ) return date; + + function local_to_utc ( + tz_id in timezones.tz_id%TYPE, + local_time in date + ) return date; + + function local_to_utc ( + tz in timezones.tz%TYPE, + local_time in date + ) return date; + + -- The following provide access to the current offset information + + function get_offset ( + -- Gets the timezone offset in seconds, for the current date, + -- modified in case of DST. + tz_id in timezones.tz_id%TYPE, + local_time in date default sysdate + ) return integer; + + function get_offset ( + tz in timezones.tz%TYPE, + local_time in date default sysdate + ) return integer; + + + function get_rawoffset ( + -- Gets the timezone offset NOT modified for DST + tz_id in timezones.tz_id%TYPE, + local_time in date default sysdate + ) return integer; + + function get_rawoffset ( + -- Gets the timezone offset NOT modified for DST + tz in timezones.tz%TYPE, + local_time in date default sysdate + ) return integer; + + function get_abbrev ( + -- Returns abbreviation for the coversion rule + tz_id in timezones.tz_id%TYPE, + local_time in date default sysdate + ) return varchar; + + function get_abbrev ( + -- Returns abbreviation for the coversion rule + tz in timezones.tz%TYPE, + local_time in date default sysdate + ) return varchar; + + function get_zone_offset ( + -- Returns the relative offset between two zones at a + -- particular UTC time. + tz_this in timezones.tz%TYPE, + tz_other in timezones.tz%TYPE, + utc_time in date default sysdate + ) return integer; + + -- Access to flags + + function isdst_p ( + -- Returns 't' if timezone is currently using DST + tz_id in timezones.tz_id%TYPE, + local_time in date default sysdate + ) return char; + + function isdst_p ( + -- Returns 't' if timezone is currently using DST + tz in timezones.tz%TYPE, + local_time in date default sysdate + ) return char; + + + -- Special formatting functions + + function get_date ( + -- Returns a formatted date with timezone info appended + tz_id in timezones.tz_id%TYPE, + local_time in date, + format in varchar default 'yyyy-mm-ss hh24:mi:ss' + ) return varchar; + + function get_date ( + -- Returns a formatted date with timezone info appended + tz in timezones.tz%TYPE, + local_time in date, + format in varchar default 'yyyy-mm-ss hh24:mi:ss' + ) return varchar; + + +end timezone; +/ +show errors + +-- +-- +-- + +create or replace package body timezone +as + procedure new ( + tz in timezones.tz%TYPE, + gmt_offset in timezones.gmt_offset%type + ) + is + begin + insert into timezones + (tz_id, tz, gmt_offset) + values + (timezone_seq.nextval, tz, gmt_offset); + end; + + procedure delete ( + tz_id in timezones.tz_id%TYPE + ) + is + begin + delete from timezone_rules where tz_id = tz_id; + delete from timezones where tz_id = tz_id; + end; + + -- private function for looking up timezone id's + + function get_id ( + tz in timezones.tz%TYPE + ) return integer + is + tz_id integer; + begin + select tz_id into tz_id + from timezones + where tz = get_id.tz; + + return tz_id; + end; + + procedure add_rule ( + tz in timezones.tz%TYPE, + abbrev in timezone_rules.abbrev%TYPE, + isdst in integer, + gmt_offset in integer, + utc_start in varchar, + utc_end in varchar, + local_start in varchar, + local_end in varchar + ) + is + begin + insert into timezone_rules + (tz_id, + abbrev, + utc_start, + utc_end, + local_start, + local_end, + gmt_offset, + isdst) + values + (get_id(tz), + abbrev, + to_date(utc_start,'Mon dd hh24:mi:ss yyyy'), + to_date(utc_end, 'Mon dd hh24:mi:ss yyyy'), + to_date(local_start,'Mon dd hh24:mi:ss yyyy'), + to_date(local_end,'Mon dd hh24:mi:ss yyyy'), + gmt_offset / 86400, + decode(isdst,0,'f',1,'t')); + end; + + + function utc_to_local ( + tz_id in timezones.tz_id%TYPE, + utc_time in date + ) return date + is + local_time date; + begin + select utc_time + gmt_offset into local_time + from timezone_rules + where tz_id = utc_to_local.tz_id + and utc_time between utc_start and utc_end + and rownum = 1; + + return local_time; + exception + when no_data_found then + return utc_time; + end utc_to_local; + + function utc_to_local ( + tz in timezones.tz%TYPE, + utc_time in date + ) return date + is + begin + return utc_to_local(get_id(tz), utc_time); + end; + + + + function local_to_utc ( + tz_id in timezones.tz_id%TYPE, + local_time in date + ) return date + is + utc_time date; + begin + select local_time - gmt_offset into utc_time + from timezone_rules + where tz_id = local_to_utc.tz_id + and local_time between local_start and local_end + and rownum = 1; + + return utc_time; + exception + when no_data_found then + return local_time; + end; + + function local_to_utc ( + tz in timezones.tz%TYPE, + local_time in date + ) return date + is + begin + return local_to_utc(get_id(tz),local_time); + end; + + function get_offset ( + tz_id in timezones.tz_id%TYPE, + local_time in date default sysdate + ) return integer + is + v_offset integer; + begin + select round(gmt_offset*86400,0) into v_offset + from timezone_rules + where tz_id = get_offset.tz_id + and local_time between local_start and local_end + and rownum = 1; + + return v_offset; + exception + when no_data_found then + return 0; + end; + + function get_offset ( + tz in timezones.tz%TYPE, + local_time in date default sysdate + ) return integer + is + begin + return get_offset(get_id(tz),local_time); + end; + + + function get_rawoffset ( + tz_id in timezones.tz_id%TYPE, + local_time in date default sysdate + ) return integer + is + v_offset number; + begin + select decode (isdst,'t', round(gmt_offset*86400,0) - 3600, + 'f', round(gmt_offset*86400,0)) into v_offset + from timezone_rules + where tz_id = get_rawoffset.tz_id + and local_time between local_start and local_end + and rownum = 1; + + return v_offset; + exception + when no_data_found then + return 0; + end; + + function get_rawoffset ( + tz in timezones.tz%TYPE, + local_time in date default sysdate + ) return integer + is + begin + return get_rawoffset(get_id(tz),local_time); + end; + + function get_abbrev ( + tz_id in timezones.tz_id%TYPE, + local_time in date default sysdate + ) return varchar + is + v_abbrev timezone_rules.abbrev%TYPE; + begin + select abbrev into v_abbrev + from timezone_rules + where tz_id = get_abbrev.tz_id + and local_time between local_start and local_end; + + return v_abbrev; + exception + when no_data_found then + return 'GMT'; + end; + + function get_abbrev ( + tz in timezones.tz%TYPE, + local_time in date default sysdate + ) return varchar + is + begin + return get_abbrev(get_id(tz),local_time); + end; + + function get_date ( + -- Returns a formatted date with timezone info appended + tz_id in timezones.tz_id%TYPE, + local_time in date, + format in varchar default 'yyyy-mm-ss hh24:mi:ss' + ) return varchar + is + v_date varchar(1000); + begin + select to_char(local_time,format) || ' ' || abbrev into v_date + from timezone_rules + where tz_id = get_date.tz_id + and local_time between local_start and local_end + and rownum = 1; + + return v_date; + exception + when no_data_found then + select to_char(local_time,format) into v_date from dual; + return v_date; + end; + + function get_date ( + tz in timezones.tz%TYPE, + local_time in date, + format in varchar default 'yyyy-mm-ss hh24:mi:ss' + ) return varchar + is + begin + return get_date(get_id(tz),local_time,format); + end; + + + function isdst_p ( + -- Returns 't' if timezone is currently using DST + tz_id in timezones.tz_id%TYPE, + local_time in date default sysdate + ) return char + is + v_isdst char; + begin + select isdst into v_isdst + from timezone_rules + where tz_id = isdst_p.tz_id + and local_time between local_start and local_end + and rownum = 1; + + return v_isdst; + exception + when no_data_found then + return 'f'; + end; + + function isdst_p ( + tz in timezones.tz%TYPE, + local_time in date default sysdate + ) return char + is + begin + return isdst_p (get_id(tz),local_time); + end; + + function get_zone_offset ( + tz_this in timezones.tz%TYPE, + tz_other in timezones.tz%TYPE, + utc_time in date default sysdate + ) return integer + is + begin + return get_offset(tz_this, utc_to_local(tz_this, utc_time)) - + get_offset(tz_other,utc_to_local(tz_other,utc_time)); + end; + +end timezone; +/ +show errors + +------------------------------------------------------------------------------- +-- TimeZone data +------------------------------------------------------------------------------- + +@../common/timezone-data +@../common/timezone-rules + +