提交 34995555 编写于 作者: W wangjiahui

fix codex and Test Code Optimization

Signed-off-by: Nwangjiahui <wangjiahui27@huawei.com>
上级 f15f4e9d
此差异已折叠。
/**
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __DIFFTIME_DATA_H__
#define __DIFFTIME_DATA_H__
#include "time_test_data.h"
static const struct time_test_double_struct test_difftime_data[] = {
{"Pacific/Rarotonga", 10.000000},
{"Pacific/Wake", 10.000000},
{"Pacific/Tarawa", 10.000000},
{"Pacific/Fakaofo", 10.000000},
{"Pacific/Apia", 10.000000},
{"Pacific/Kwajalein", 10.000000},
{"Pacific/Tahiti", 10.000000},
{"Pacific/Easter", 10.000000},
{"Pacific/Tongatapu", 10.000000},
{"Pacific/Guadalcanal", 10.000000},
{"Pacific/Chuuk", 10.000000},
{"Pacific/Pitcairn", 10.000000},
{"Pacific/Pohnpei", 10.000000},
{"Pacific/Fiji", 10.000000},
{"Pacific/Majuro", 10.000000},
{"Pacific/Kiritimati", 10.000000},
{"Pacific/Port_Moresby", 10.000000},
{"Pacific/Galapagos", 10.000000},
{"Pacific/Saipan", 10.000000},
{"Pacific/Marquesas", 10.000000},
{"Pacific/Wallis", 10.000000},
{"Pacific/Palau", 10.000000},
{"Pacific/Bougainville", 10.000000},
{"Pacific/Honolulu", 10.000000},
{"Pacific/Noumea", 10.000000},
{"Pacific/Pago_Pago", 10.000000},
{"Pacific/Guam", 10.000000},
{"Pacific/Auckland", 10.000000},
{"Pacific/Norfolk", 10.000000},
{"Pacific/Kosrae", 10.000000},
{"Pacific/Nauru", 10.000000},
{"Pacific/Chatham", 10.000000},
{"Pacific/Efate", 10.000000},
{"Pacific/Midway", 10.000000},
{"Pacific/Niue", 10.000000},
{"Pacific/Enderbury", 10.000000},
{"Pacific/Funafuti", 10.000000},
{"Pacific/Gambier", 10.000000},
{"EET", 10.000000},
{"MST", 10.000000},
{"Europe/Dublin", 10.000000},
{"Europe/Minsk", 10.000000},
{"Europe/Budapest", 10.000000},
{"Europe/Riga", 10.000000},
{"Europe/Jersey", 10.000000},
{"Europe/London", 10.000000},
{"Europe/Istanbul", 10.000000},
{"Europe/Moscow", 10.000000},
{"Europe/Chisinau", 10.000000},
{"Europe/Andorra", 10.000000},
{"Europe/Vaduz", 10.000000},
{"Europe/Zaporozhye", 10.000000},
{"Europe/San_Marino", 10.000000},
{"Europe/Monaco", 10.000000},
{"Europe/Ulyanovsk", 10.000000},
{"Europe/Isle_of_Man", 10.000000},
{"Europe/Tirane", 10.000000},
{"Europe/Vatican", 10.000000},
{"Europe/Belgrade", 10.000000},
{"Europe/Paris", 10.000000},
{"Europe/Nicosia", 10.000000},
{"Europe/Athens", 10.000000},
{"Europe/Malta", 10.000000},
{"Europe/Astrakhan", 10.000000},
{"Europe/Bratislava", 10.000000},
{"Europe/Uzhgorod", 10.000000},
{"Europe/Zurich", 10.000000},
{"Europe/Brussels", 10.000000},
{"Europe/Sofia", 10.000000},
{"Europe/Kiev", 10.000000},
{"Europe/Guernsey", 10.000000},
{"Europe/Busingen", 10.000000},
{"Europe/Copenhagen", 10.000000},
{"Europe/Skopje", 10.000000},
{"Europe/Luxembourg", 10.000000},
{"Europe/Lisbon", 10.000000},
{"Europe/Saratov", 10.000000},
{"Europe/Zagreb", 10.000000},
{"Europe/Simferopol", 10.000000},
{"Europe/Amsterdam", 10.000000},
{"Europe/Oslo", 10.000000},
{"Europe/Samara", 10.000000},
{"Europe/Warsaw", 10.000000},
{"Europe/Prague", 10.000000},
{"Europe/Vienna", 10.000000},
{"Europe/Mariehamn", 10.000000},
{"Europe/Gibraltar", 10.000000},
{"Europe/Stockholm", 10.000000},
{"Europe/Tallinn", 10.000000},
{"Europe/Kaliningrad", 10.000000},
{"Europe/Podgorica", 10.000000},
{"Europe/Kirov", 10.000000},
{"Europe/Helsinki", 10.000000},
{"Europe/Sarajevo", 10.000000},
{"Europe/Rome", 10.000000},
{"Europe/Bucharest", 10.000000},
{"Europe/Berlin", 10.000000},
{"Europe/Volgograd", 10.000000},
{"Europe/Ljubljana", 10.000000},
{"Europe/Vilnius", 10.000000},
{"Europe/Madrid", 10.000000},
{"Antarctica/Casey", 10.000000},
{"Antarctica/Macquarie", 10.000000},
{"Antarctica/Rothera", 10.000000},
{"Antarctica/Vostok", 10.000000},
{"Antarctica/Davis", 10.000000},
{"Antarctica/Troll", 10.000000},
{"Antarctica/Mawson", 10.000000},
{"Antarctica/McMurdo", 10.000000},
{"Antarctica/DumontDUrville", 10.000000},
{"Antarctica/Palmer", 10.000000},
{"Antarctica/Syowa", 10.000000},
{"WET", 10.000000},
{"CST6CDT", 10.000000},
{"MET", 10.000000},
{"Arctic/Longyearbyen", 10.000000},
{"Atlantic/Faroe", 10.000000},
{"Atlantic/Madeira", 10.000000},
{"Atlantic/Canary", 10.000000},
{"Atlantic/Reykjavik", 10.000000},
{"Atlantic/St_Helena", 10.000000},
{"Atlantic/South_Georgia", 10.000000},
{"Atlantic/Azores", 10.000000},
{"Atlantic/Bermuda", 10.000000},
{"Atlantic/Stanley", 10.000000},
{"Atlantic/Cape_Verde", 10.000000},
{"Africa/Niamey", 10.000000},
{"Africa/Algiers", 10.000000},
{"Africa/Maputo", 10.000000},
{"Africa/Johannesburg", 10.000000},
{"Africa/Addis_Ababa", 10.000000},
{"Africa/Malabo", 10.000000},
{"Africa/Cairo", 10.000000},
{"Africa/Bissau", 10.000000},
{"Africa/Ndjamena", 10.000000},
{"Africa/Tunis", 10.000000},
{"Africa/Harare", 10.000000},
{"Africa/El_Aaiun", 10.000000},
{"Africa/Kampala", 10.000000},
{"Africa/Libreville", 10.000000},
{"Africa/Blantyre", 10.000000},
{"Africa/Brazzaville", 10.000000},
{"Africa/Bangui", 10.000000},
{"Africa/Luanda", 10.000000},
{"Africa/Freetown", 10.000000},
{"Africa/Casablanca", 10.000000},
{"Africa/Conakry", 10.000000},
{"Africa/Kinshasa", 10.000000},
{"Africa/Dakar", 10.000000},
{"Africa/Ouagadougou", 10.000000},
{"Africa/Nouakchott", 10.000000},
{"Africa/Monrovia", 10.000000},
{"Africa/Kigali", 10.000000},
{"Africa/Windhoek", 10.000000},
{"Africa/Juba", 10.000000},
{"Africa/Sao_Tome", 10.000000},
{"Africa/Banjul", 10.000000},
{"Africa/Mbabane", 10.000000},
{"Africa/Asmara", 10.000000},
{"Africa/Djibouti", 10.000000},
{"Africa/Tripoli", 10.000000},
{"Africa/Ceuta", 10.000000},
{"Africa/Khartoum", 10.000000},
{"Africa/Bamako", 10.000000},
{"Africa/Porto-Novo", 10.000000},
{"Africa/Mogadishu", 10.000000},
{"Africa/Abidjan", 10.000000},
{"Africa/Lusaka", 10.000000},
{"Africa/Lagos", 10.000000},
{"Africa/Lubumbashi", 10.000000},
{"Africa/Nairobi", 10.000000},
{"Africa/Accra", 10.000000},
{"Africa/Maseru", 10.000000},
{"Africa/Lome", 10.000000},
{"Africa/Douala", 10.000000},
{"Africa/Bujumbura", 10.000000},
{"Africa/Dar_es_Salaam", 10.000000},
{"Africa/Gaborone", 10.000000},
{"Australia/Adelaide", 10.000000},
{"Australia/Broken_Hill", 10.000000},
{"Australia/Perth", 10.000000},
{"Australia/Darwin", 10.000000},
{"Australia/Lord_Howe", 10.000000},
{"Australia/Hobart", 10.000000},
{"Australia/Brisbane", 10.000000},
{"Australia/Sydney", 10.000000},
{"Australia/Lindeman", 10.000000},
{"Australia/Melbourne", 10.000000},
{"Australia/Eucla", 10.000000},
{"America/Grand_Turk", 10.000000},
{"America/St_Thomas", 10.000000},
{"America/Havana", 10.000000},
{"America/Thunder_Bay", 10.000000},
{"America/Inuvik", 10.000000},
{"America/Winnipeg", 10.000000},
{"America/Maceio", 10.000000},
{"America/Chihuahua", 10.000000},
{"America/North_Dakota/Beulah", 10.000000},
{"America/North_Dakota/Center", 10.000000},
{"America/North_Dakota/New_Salem", 10.000000},
{"America/Campo_Grande", 10.000000},
{"America/Scoresbysund", 10.000000},
{"America/Tijuana", 10.000000},
{"America/Bahia", 10.000000},
{"America/St_Vincent", 10.000000},
{"America/Creston", 10.000000},
{"America/Dawson", 10.000000},
{"America/Tegucigalpa", 10.000000},
{"America/Lima", 10.000000},
{"America/Mexico_City", 10.000000},
{"America/Dominica", 10.000000},
{"America/Atikokan", 10.000000},
{"America/Port-au-Prince", 10.000000},
{"America/Yakutat", 10.000000},
{"America/St_Kitts", 10.000000},
{"America/Guatemala", 10.000000},
{"America/St_Barthelemy", 10.000000},
{"America/Vancouver", 10.000000},
{"America/Jamaica", 10.000000},
{"America/Whitehorse", 10.000000},
{"America/Asuncion", 10.000000},
{"America/Toronto", 10.000000},
{"America/Hermosillo", 10.000000},
{"America/Denver", 10.000000},
{"America/Mazatlan", 10.000000},
{"America/Iqaluit", 10.000000},
{"America/Nuuk", 10.000000},
{"America/Cayenne", 10.000000},
{"America/Santarem", 10.000000},
{"America/Noronha", 10.000000},
{"America/Ojinaga", 10.000000},
{"America/Fort_Nelson", 10.000000},
{"America/Aruba", 10.000000},
{"America/Indiana/Vevay", 10.000000},
{"America/Indiana/Marengo", 10.000000},
{"America/Indiana/Indianapolis", 10.000000},
{"America/Indiana/Tell_City", 10.000000},
{"America/Indiana/Petersburg", 10.000000},
{"America/Indiana/Winamac", 10.000000},
{"America/Indiana/Knox", 10.000000},
{"America/Indiana/Vincennes", 10.000000},
{"America/Cayman", 10.000000},
{"America/Sao_Paulo", 10.000000},
{"America/Curacao", 10.000000},
{"America/Anchorage", 10.000000},
{"America/Guyana", 10.000000},
{"America/Rankin_Inlet", 10.000000},
{"America/Antigua", 10.000000},
{"America/Juneau", 10.000000},
{"America/Merida", 10.000000},
{"America/Punta_Arenas", 10.000000},
{"America/Moncton", 10.000000},
{"America/Fortaleza", 10.000000},
{"America/Resolute", 10.000000},
{"America/Nassau", 10.000000},
{"America/Edmonton", 10.000000},
{"America/Regina", 10.000000},
{"America/Halifax", 10.000000},
{"America/Danmarkshavn", 10.000000},
{"America/Metlakatla", 10.000000},
{"America/Guadeloupe", 10.000000},
{"America/Caracas", 10.000000},
{"America/Detroit", 10.000000},
{"America/Matamoros", 10.000000},
{"America/Glace_Bay", 10.000000},
{"America/Phoenix", 10.000000},
{"America/La_Paz", 10.000000},
{"America/Swift_Current", 10.000000},
{"America/Nipigon", 10.000000},
{"America/Cancun", 10.000000},
{"America/Port_of_Spain", 10.000000},
{"America/Kralendijk", 10.000000},
{"America/Grenada", 10.000000},
{"America/Belem", 10.000000},
{"America/Managua", 10.000000},
{"America/Adak", 10.000000},
{"America/St_Lucia", 10.000000},
{"America/Rio_Branco", 10.000000},
{"America/Santiago", 10.000000},
{"America/Puerto_Rico", 10.000000},
{"America/Miquelon", 10.000000},
{"America/Cuiaba", 10.000000},
{"America/Martinique", 10.000000},
{"America/Argentina/Buenos_Aires", 10.000000},
{"America/Argentina/San_Luis", 10.000000},
{"America/Argentina/Catamarca", 10.000000},
{"America/Argentina/Jujuy", 10.000000},
{"America/Argentina/Salta", 10.000000},
{"America/Argentina/Ushuaia", 10.000000},
{"America/Argentina/Mendoza", 10.000000},
{"America/Argentina/Rio_Gallegos", 10.000000},
{"America/Argentina/Tucuman", 10.000000},
{"America/Argentina/San_Juan", 10.000000},
{"America/Argentina/Cordoba", 10.000000},
{"America/Argentina/La_Rioja", 10.000000},
{"America/Barbados", 10.000000},
{"America/Monterrey", 10.000000},
{"America/Thule", 10.000000},
{"America/Montserrat", 10.000000},
{"America/Guayaquil", 10.000000},
{"America/St_Johns", 10.000000},
{"America/Boise", 10.000000},
{"America/Manaus", 10.000000},
{"America/Nome", 10.000000},
{"America/Goose_Bay", 10.000000},
{"America/Belize", 10.000000},
{"America/Sitka", 10.000000},
{"America/Dawson_Creek", 10.000000},
{"America/Recife", 10.000000},
{"America/Kentucky/Louisville", 10.000000},
{"America/Kentucky/Monticello", 10.000000},
{"America/New_York", 10.000000},
{"America/Tortola", 10.000000},
{"America/Chicago", 10.000000},
{"America/Pangnirtung", 10.000000},
{"America/Boa_Vista", 10.000000},
{"America/Bogota", 10.000000},
{"America/Rainy_River", 10.000000},
{"America/El_Salvador", 10.000000},
{"America/Bahia_Banderas", 10.000000},
{"America/Yellowknife", 10.000000},
{"America/Montevideo", 10.000000},
{"America/Cambridge_Bay", 10.000000},
{"America/Panama", 10.000000},
{"America/Santo_Domingo", 10.000000},
{"America/Anguilla", 10.000000},
{"America/Paramaribo", 10.000000},
{"America/Marigot", 10.000000},
{"America/Menominee", 10.000000},
{"America/Blanc-Sablon", 10.000000},
{"America/Costa_Rica", 10.000000},
{"America/Los_Angeles", 10.000000},
{"America/Lower_Princes", 10.000000},
{"America/Eirunepe", 10.000000},
{"America/Araguaina", 10.000000},
{"America/Porto_Velho", 10.000000},
{"EST", 10.000000},
{"CET", 10.000000},
{"MST7MDT", 10.000000},
{"Indian/Chagos", 10.000000},
{"Indian/Kerguelen", 10.000000},
{"Indian/Reunion", 10.000000},
{"Indian/Antananarivo", 10.000000},
{"Indian/Cocos", 10.000000},
{"Indian/Mauritius", 10.000000},
{"Indian/Christmas", 10.000000},
{"Indian/Maldives", 10.000000},
{"Indian/Comoro", 10.000000},
{"Indian/Mahe", 10.000000},
{"Indian/Mayotte", 10.000000},
{"Asia/Novokuznetsk", 10.000000},
{"Asia/Magadan", 10.000000},
{"Asia/Yangon", 10.000000},
{"Asia/Samarkand", 10.000000},
{"Asia/Tehran", 10.000000},
{"Asia/Dili", 10.000000},
{"Asia/Yerevan", 10.000000},
{"Asia/Qatar", 10.000000},
{"Asia/Chita", 10.000000},
{"Asia/Makassar", 10.000000},
{"Asia/Hovd", 10.000000},
{"Asia/Istanbul", 10.000000},
{"Asia/Irkutsk", 10.000000},
{"Asia/Pontianak", 10.000000},
{"Asia/Qyzylorda", 10.000000},
{"Asia/Srednekolymsk", 10.000000},
{"Asia/Aden", 10.000000},
{"Asia/Kabul", 10.000000},
{"Asia/Macau", 10.000000},
{"Asia/Riyadh", 10.000000},
{"Asia/Taipei", 10.000000},
{"Asia/Manila", 10.000000},
{"Asia/Aqtau", 10.000000},
{"Asia/Thimphu", 10.000000},
{"Asia/Shanghai", 10.000000},
{"Asia/Choibalsan", 10.000000},
{"Asia/Nicosia", 10.000000},
{"Asia/Dubai", 10.000000},
{"Asia/Baku", 10.000000},
{"Asia/Kuching", 10.000000},
{"Asia/Gaza", 10.000000},
{"Asia/Jayapura", 10.000000},
{"Asia/Tokyo", 10.000000},
{"Asia/Muscat", 10.000000},
{"Asia/Kolkata", 10.000000},
{"Asia/Ho_Chi_Minh", 10.000000},
{"Asia/Tashkent", 10.000000},
{"Asia/Bangkok", 10.000000},
{"Asia/Karachi", 10.000000},
{"Asia/Krasnoyarsk", 10.000000},
{"Asia/Yekaterinburg", 10.000000},
{"Asia/Famagusta", 10.000000},
{"Asia/Ulaanbaatar", 10.000000},
{"Asia/Bahrain", 10.000000},
{"Asia/Barnaul", 10.000000},
{"Asia/Jerusalem", 10.000000},
{"Asia/Qostanay", 10.000000},
{"Asia/Ust-Nera", 10.000000},
{"Asia/Tomsk", 10.000000},
{"Asia/Kuala_Lumpur", 10.000000},
{"Asia/Brunei", 10.000000},
{"Asia/Aqtobe", 10.000000},
{"Asia/Vladivostok", 10.000000},
{"Asia/Damascus", 10.000000},
{"Asia/Omsk", 10.000000},
{"Asia/Almaty", 10.000000},
{"Asia/Dhaka", 10.000000},
{"Asia/Tbilisi", 10.000000},
{"Asia/Baghdad", 10.000000},
{"Asia/Phnom_Penh", 10.000000},
{"Asia/Kamchatka", 10.000000},
{"Asia/Ashgabat", 10.000000},
{"Asia/Sakhalin", 10.000000},
{"Asia/Novosibirsk", 10.000000},
{"Asia/Kuwait", 10.000000},
{"Asia/Hong_Kong", 10.000000},
{"Asia/Amman", 10.000000},
{"Asia/Beirut", 10.000000},
{"Asia/Yakutsk", 10.000000},
{"Asia/Colombo", 10.000000},
{"Asia/Oral", 10.000000},
{"Asia/Kathmandu", 10.000000},
{"Asia/Bishkek", 10.000000},
{"Asia/Hebron", 10.000000},
{"Asia/Singapore", 10.000000},
{"Asia/Atyrau", 10.000000},
{"Asia/Khandyga", 10.000000},
{"Asia/Vientiane", 10.000000},
{"Asia/Jakarta", 10.000000},
{"Asia/Dushanbe", 10.000000},
{"Asia/Seoul", 10.000000},
{"Asia/Pyongyang", 10.000000},
{"Asia/Urumqi", 10.000000},
{"Asia/Anadyr", 10.000000},
{"PST8PDT", 10.000000},
{"HST", 10.000000},
{"EST5EDT", 10.000000},
};
#endif
\ No newline at end of file
此差异已折叠。
此差异已折叠。
/**
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __MKTIME_DATA_H__
#define __MKTIME_DATA_H__
#include "time_test_data.h"
static const struct time_test_time_struct test_mktime_data[] = {
{"Pacific/Rarotonga", 1659177614},
{"Pacific/Wake", 1659177614},
{"Pacific/Tarawa", 1659177614},
{"Pacific/Fakaofo", 1659177614},
{"Pacific/Apia", 1659177614},
{"Pacific/Kwajalein", 1659177614},
{"Pacific/Tahiti", 1659177614},
{"Pacific/Easter", 1659177614},
{"Pacific/Tongatapu", 1659177614},
{"Pacific/Guadalcanal", 1659177614},
{"Pacific/Chuuk", 1659177614},
{"Pacific/Pitcairn", 1659177614},
{"Pacific/Pohnpei", 1659177614},
{"Pacific/Fiji", 1659177614},
{"Pacific/Majuro", 1659177614},
{"Pacific/Kiritimati", 1659177614},
{"Pacific/Port_Moresby", 1659177614},
{"Pacific/Galapagos", 1659177614},
{"Pacific/Saipan", 1659177614},
{"Pacific/Marquesas", 1659177614},
{"Pacific/Wallis", 1659177614},
{"Pacific/Palau", 1659177614},
{"Pacific/Bougainville", 1659177614},
{"Pacific/Honolulu", 1659177614},
{"Pacific/Noumea", 1659177614},
{"Pacific/Pago_Pago", 1659177614},
{"Pacific/Guam", 1659177614},
{"Pacific/Auckland", 1659177614},
{"Pacific/Norfolk", 1659177614},
{"Pacific/Kosrae", 1659177614},
{"Pacific/Nauru", 1659177614},
{"Pacific/Chatham", 1659177614},
{"Pacific/Efate", 1659177614},
{"Pacific/Midway", 1659177614},
{"Pacific/Niue", 1659177614},
{"Pacific/Enderbury", 1659177614},
{"Pacific/Funafuti", 1659177614},
{"Pacific/Gambier", 1659177614},
{"EET", 1659177614},
{"MST", 1659177614},
{"Europe/Dublin", 1659177614},
{"Europe/Minsk", 1659177614},
{"Europe/Budapest", 1659177614},
{"Europe/Riga", 1659177614},
{"Europe/Jersey", 1659177614},
{"Europe/London", 1659177614},
{"Europe/Istanbul", 1659177614},
{"Europe/Moscow", 1659177614},
{"Europe/Chisinau", 1659177614},
{"Europe/Andorra", 1659177614},
{"Europe/Vaduz", 1659177614},
{"Europe/Zaporozhye", 1659177614},
{"Europe/San_Marino", 1659177614},
{"Europe/Monaco", 1659177614},
{"Europe/Ulyanovsk", 1659177614},
{"Europe/Isle_of_Man", 1659177614},
{"Europe/Tirane", 1659177614},
{"Europe/Vatican", 1659177614},
{"Europe/Belgrade", 1659177614},
{"Europe/Paris", 1659177614},
{"Europe/Nicosia", 1659177614},
{"Europe/Athens", 1659177614},
{"Europe/Malta", 1659177614},
{"Europe/Astrakhan", 1659177614},
{"Europe/Bratislava", 1659177614},
{"Europe/Uzhgorod", 1659177614},
{"Europe/Zurich", 1659177614},
{"Europe/Brussels", 1659177614},
{"Europe/Sofia", 1659177614},
{"Europe/Kiev", 1659177614},
{"Europe/Guernsey", 1659177614},
{"Europe/Busingen", 1659177614},
{"Europe/Copenhagen", 1659177614},
{"Europe/Skopje", 1659177614},
{"Europe/Luxembourg", 1659177614},
{"Europe/Lisbon", 1659177614},
{"Europe/Saratov", 1659177614},
{"Europe/Zagreb", 1659177614},
{"Europe/Simferopol", 1659177614},
{"Europe/Amsterdam", 1659177614},
{"Europe/Oslo", 1659177614},
{"Europe/Samara", 1659177614},
{"Europe/Warsaw", 1659177614},
{"Europe/Prague", 1659177614},
{"Europe/Vienna", 1659177614},
{"Europe/Mariehamn", 1659177614},
{"Europe/Gibraltar", 1659177614},
{"Europe/Stockholm", 1659177614},
{"Europe/Tallinn", 1659177614},
{"Europe/Kaliningrad", 1659177614},
{"Europe/Podgorica", 1659177614},
{"Europe/Kirov", 1659177614},
{"Europe/Helsinki", 1659177614},
{"Europe/Sarajevo", 1659177614},
{"Europe/Rome", 1659177614},
{"Europe/Bucharest", 1659177614},
{"Europe/Berlin", 1659177614},
{"Europe/Volgograd", 1659177614},
{"Europe/Ljubljana", 1659177614},
{"Europe/Vilnius", 1659177614},
{"Europe/Madrid", 1659177614},
{"Antarctica/Casey", 1659177614},
{"Antarctica/Macquarie", 1659177614},
{"Antarctica/Rothera", 1659177614},
{"Antarctica/Vostok", 1659177614},
{"Antarctica/Davis", 1659177614},
{"Antarctica/Troll", 1659177614},
{"Antarctica/Mawson", 1659177614},
{"Antarctica/McMurdo", 1659177614},
{"Antarctica/DumontDUrville", 1659177614},
{"Antarctica/Palmer", 1659177614},
{"Antarctica/Syowa", 1659177614},
{"WET", 1659177614},
{"CST6CDT", 1659177614},
{"MET", 1659177614},
{"Arctic/Longyearbyen", 1659177614},
{"Atlantic/Faroe", 1659177614},
{"Atlantic/Madeira", 1659177614},
{"Atlantic/Canary", 1659177614},
{"Atlantic/Reykjavik", 1659177614},
{"Atlantic/St_Helena", 1659177614},
{"Atlantic/South_Georgia", 1659177614},
{"Atlantic/Azores", 1659177614},
{"Atlantic/Bermuda", 1659177614},
{"Atlantic/Stanley", 1659177614},
{"Atlantic/Cape_Verde", 1659177614},
{"Africa/Niamey", 1659177614},
{"Africa/Algiers", 1659177614},
{"Africa/Maputo", 1659177614},
{"Africa/Johannesburg", 1659177614},
{"Africa/Addis_Ababa", 1659177614},
{"Africa/Malabo", 1659177614},
{"Africa/Cairo", 1659177614},
{"Africa/Bissau", 1659177614},
{"Africa/Ndjamena", 1659177614},
{"Africa/Tunis", 1659177614},
{"Africa/Harare", 1659177614},
{"Africa/El_Aaiun", 1659177614},
{"Africa/Kampala", 1659177614},
{"Africa/Libreville", 1659177614},
{"Africa/Blantyre", 1659177614},
{"Africa/Brazzaville", 1659177614},
{"Africa/Bangui", 1659177614},
{"Africa/Luanda", 1659177614},
{"Africa/Freetown", 1659177614},
{"Africa/Casablanca", 1659177614},
{"Africa/Conakry", 1659177614},
{"Africa/Kinshasa", 1659177614},
{"Africa/Dakar", 1659177614},
{"Africa/Ouagadougou", 1659177614},
{"Africa/Nouakchott", 1659177614},
{"Africa/Monrovia", 1659177614},
{"Africa/Kigali", 1659177614},
{"Africa/Windhoek", 1659177614},
{"Africa/Juba", 1659177614},
{"Africa/Sao_Tome", 1659177614},
{"Africa/Banjul", 1659177614},
{"Africa/Mbabane", 1659177614},
{"Africa/Asmara", 1659177614},
{"Africa/Djibouti", 1659177614},
{"Africa/Tripoli", 1659177614},
{"Africa/Ceuta", 1659177614},
{"Africa/Khartoum", 1659177614},
{"Africa/Bamako", 1659177614},
{"Africa/Porto-Novo", 1659177614},
{"Africa/Mogadishu", 1659177614},
{"Africa/Abidjan", 1659177614},
{"Africa/Lusaka", 1659177614},
{"Africa/Lagos", 1659177614},
{"Africa/Lubumbashi", 1659177614},
{"Africa/Nairobi", 1659177614},
{"Africa/Accra", 1659177614},
{"Africa/Maseru", 1659177614},
{"Africa/Lome", 1659177614},
{"Africa/Douala", 1659177614},
{"Africa/Bujumbura", 1659177614},
{"Africa/Dar_es_Salaam", 1659177614},
{"Africa/Gaborone", 1659177614},
{"Australia/Adelaide", 1659177614},
{"Australia/Broken_Hill", 1659177614},
{"Australia/Perth", 1659177614},
{"Australia/Darwin", 1659177614},
{"Australia/Lord_Howe", 1659177614},
{"Australia/Hobart", 1659177614},
{"Australia/Brisbane", 1659177614},
{"Australia/Sydney", 1659177614},
{"Australia/Lindeman", 1659177614},
{"Australia/Melbourne", 1659177614},
{"Australia/Eucla", 1659177614},
{"America/Grand_Turk", 1659177614},
{"America/St_Thomas", 1659177614},
{"America/Havana", 1659177614},
{"America/Thunder_Bay", 1659177614},
{"America/Inuvik", 1659177614},
{"America/Winnipeg", 1659177614},
{"America/Maceio", 1659177614},
{"America/Chihuahua", 1659177614},
{"America/North_Dakota/Beulah", 1659177614},
{"America/North_Dakota/Center", 1659177614},
{"America/North_Dakota/New_Salem", 1659177614},
{"America/Campo_Grande", 1659177614},
{"America/Scoresbysund", 1659177614},
{"America/Tijuana", 1659177614},
{"America/Bahia", 1659177614},
{"America/St_Vincent", 1659177614},
{"America/Creston", 1659177614},
{"America/Dawson", 1659177614},
{"America/Tegucigalpa", 1659177614},
{"America/Lima", 1659177614},
{"America/Mexico_City", 1659177614},
{"America/Dominica", 1659177614},
{"America/Atikokan", 1659177614},
{"America/Port-au-Prince", 1659177614},
{"America/Yakutat", 1659177614},
{"America/St_Kitts", 1659177614},
{"America/Guatemala", 1659177614},
{"America/St_Barthelemy", 1659177614},
{"America/Vancouver", 1659177614},
{"America/Jamaica", 1659177614},
{"America/Whitehorse", 1659177614},
{"America/Asuncion", 1659177614},
{"America/Toronto", 1659177614},
{"America/Hermosillo", 1659177614},
{"America/Denver", 1659177614},
{"America/Mazatlan", 1659177614},
{"America/Iqaluit", 1659177614},
{"America/Nuuk", 1659177614},
{"America/Cayenne", 1659177614},
{"America/Santarem", 1659177614},
{"America/Noronha", 1659177614},
{"America/Ojinaga", 1659177614},
{"America/Fort_Nelson", 1659177614},
{"America/Aruba", 1659177614},
{"America/Indiana/Vevay", 1659177614},
{"America/Indiana/Marengo", 1659177614},
{"America/Indiana/Indianapolis", 1659177614},
{"America/Indiana/Tell_City", 1659177614},
{"America/Indiana/Petersburg", 1659177614},
{"America/Indiana/Winamac", 1659177614},
{"America/Indiana/Knox", 1659177614},
{"America/Indiana/Vincennes", 1659177614},
{"America/Cayman", 1659177614},
{"America/Sao_Paulo", 1659177614},
{"America/Curacao", 1659177614},
{"America/Anchorage", 1659177614},
{"America/Guyana", 1659177614},
{"America/Rankin_Inlet", 1659177614},
{"America/Antigua", 1659177614},
{"America/Juneau", 1659177614},
{"America/Merida", 1659177614},
{"America/Punta_Arenas", 1659177614},
{"America/Moncton", 1659177614},
{"America/Fortaleza", 1659177614},
{"America/Resolute", 1659177614},
{"America/Nassau", 1659177614},
{"America/Edmonton", 1659177614},
{"America/Regina", 1659177614},
{"America/Halifax", 1659177614},
{"America/Danmarkshavn", 1659177614},
{"America/Metlakatla", 1659177614},
{"America/Guadeloupe", 1659177614},
{"America/Caracas", 1659177614},
{"America/Detroit", 1659177614},
{"America/Matamoros", 1659177614},
{"America/Glace_Bay", 1659177614},
{"America/Phoenix", 1659177614},
{"America/La_Paz", 1659177614},
{"America/Swift_Current", 1659177614},
{"America/Nipigon", 1659177614},
{"America/Cancun", 1659177614},
{"America/Port_of_Spain", 1659177614},
{"America/Kralendijk", 1659177614},
{"America/Grenada", 1659177614},
{"America/Belem", 1659177614},
{"America/Managua", 1659177614},
{"America/Adak", 1659177614},
{"America/St_Lucia", 1659177614},
{"America/Rio_Branco", 1659177614},
{"America/Santiago", 1659177614},
{"America/Puerto_Rico", 1659177614},
{"America/Miquelon", 1659177614},
{"America/Cuiaba", 1659177614},
{"America/Martinique", 1659177614},
{"America/Argentina/Buenos_Aires", 1659177614},
{"America/Argentina/San_Luis", 1659177614},
{"America/Argentina/Catamarca", 1659177614},
{"America/Argentina/Jujuy", 1659177614},
{"America/Argentina/Salta", 1659177614},
{"America/Argentina/Ushuaia", 1659177614},
{"America/Argentina/Mendoza", 1659177614},
{"America/Argentina/Rio_Gallegos", 1659177614},
{"America/Argentina/Tucuman", 1659177614},
{"America/Argentina/San_Juan", 1659177614},
{"America/Argentina/Cordoba", 1659177614},
{"America/Argentina/La_Rioja", 1659177614},
{"America/Barbados", 1659177614},
{"America/Monterrey", 1659177614},
{"America/Thule", 1659177614},
{"America/Montserrat", 1659177614},
{"America/Guayaquil", 1659177614},
{"America/St_Johns", 1659177614},
{"America/Boise", 1659177614},
{"America/Manaus", 1659177614},
{"America/Nome", 1659177614},
{"America/Goose_Bay", 1659177614},
{"America/Belize", 1659177614},
{"America/Sitka", 1659177614},
{"America/Dawson_Creek", 1659177614},
{"America/Recife", 1659177614},
{"America/Kentucky/Louisville", 1659177614},
{"America/Kentucky/Monticello", 1659177614},
{"America/New_York", 1659177614},
{"America/Tortola", 1659177614},
{"America/Chicago", 1659177614},
{"America/Pangnirtung", 1659177614},
{"America/Boa_Vista", 1659177614},
{"America/Bogota", 1659177614},
{"America/Rainy_River", 1659177614},
{"America/El_Salvador", 1659177614},
{"America/Bahia_Banderas", 1659177614},
{"America/Yellowknife", 1659177614},
{"America/Montevideo", 1659177614},
{"America/Cambridge_Bay", 1659177614},
{"America/Panama", 1659177614},
{"America/Santo_Domingo", 1659177614},
{"America/Anguilla", 1659177614},
{"America/Paramaribo", 1659177614},
{"America/Marigot", 1659177614},
{"America/Menominee", 1659177614},
{"America/Blanc-Sablon", 1659177614},
{"America/Costa_Rica", 1659177614},
{"America/Los_Angeles", 1659177614},
{"America/Lower_Princes", 1659177614},
{"America/Eirunepe", 1659177614},
{"America/Araguaina", 1659177614},
{"America/Porto_Velho", 1659177614},
{"EST", 1659177614},
{"CET", 1659177614},
{"MST7MDT", 1659177614},
{"Indian/Chagos", 1659177614},
{"Indian/Kerguelen", 1659177614},
{"Indian/Reunion", 1659177614},
{"Indian/Antananarivo", 1659177614},
{"Indian/Cocos", 1659177614},
{"Indian/Mauritius", 1659177614},
{"Indian/Christmas", 1659177614},
{"Indian/Maldives", 1659177614},
{"Indian/Comoro", 1659177614},
{"Indian/Mahe", 1659177614},
{"Indian/Mayotte", 1659177614},
{"Asia/Novokuznetsk", 1659177614},
{"Asia/Magadan", 1659177614},
{"Asia/Yangon", 1659177614},
{"Asia/Samarkand", 1659177614},
{"Asia/Tehran", 1659177614},
{"Asia/Dili", 1659177614},
{"Asia/Yerevan", 1659177614},
{"Asia/Qatar", 1659177614},
{"Asia/Chita", 1659177614},
{"Asia/Makassar", 1659177614},
{"Asia/Hovd", 1659177614},
{"Asia/Istanbul", 1659177614},
{"Asia/Irkutsk", 1659177614},
{"Asia/Pontianak", 1659177614},
{"Asia/Qyzylorda", 1659177614},
{"Asia/Srednekolymsk", 1659177614},
{"Asia/Aden", 1659177614},
{"Asia/Kabul", 1659177614},
{"Asia/Macau", 1659177614},
{"Asia/Riyadh", 1659177614},
{"Asia/Taipei", 1659177614},
{"Asia/Manila", 1659177614},
{"Asia/Aqtau", 1659177614},
{"Asia/Thimphu", 1659177614},
{"Asia/Shanghai", 1659177614},
{"Asia/Choibalsan", 1659177614},
{"Asia/Nicosia", 1659177614},
{"Asia/Dubai", 1659177614},
{"Asia/Baku", 1659177614},
{"Asia/Kuching", 1659177614},
{"Asia/Gaza", 1659177614},
{"Asia/Jayapura", 1659177614},
{"Asia/Tokyo", 1659177614},
{"Asia/Muscat", 1659177614},
{"Asia/Kolkata", 1659177614},
{"Asia/Ho_Chi_Minh", 1659177614},
{"Asia/Tashkent", 1659177614},
{"Asia/Bangkok", 1659177614},
{"Asia/Karachi", 1659177614},
{"Asia/Krasnoyarsk", 1659177614},
{"Asia/Yekaterinburg", 1659177614},
{"Asia/Famagusta", 1659177614},
{"Asia/Ulaanbaatar", 1659177614},
{"Asia/Bahrain", 1659177614},
{"Asia/Barnaul", 1659177614},
{"Asia/Jerusalem", 1659177614},
{"Asia/Qostanay", 1659177614},
{"Asia/Ust-Nera", 1659177614},
{"Asia/Tomsk", 1659177614},
{"Asia/Kuala_Lumpur", 1659177614},
{"Asia/Brunei", 1659177614},
{"Asia/Aqtobe", 1659177614},
{"Asia/Vladivostok", 1659177614},
{"Asia/Damascus", 1659177614},
{"Asia/Omsk", 1659177614},
{"Asia/Almaty", 1659177614},
{"Asia/Dhaka", 1659177614},
{"Asia/Tbilisi", 1659177614},
{"Asia/Baghdad", 1659177614},
{"Asia/Phnom_Penh", 1659177614},
{"Asia/Kamchatka", 1659177614},
{"Asia/Ashgabat", 1659177614},
{"Asia/Sakhalin", 1659177614},
{"Asia/Novosibirsk", 1659177614},
{"Asia/Kuwait", 1659177614},
{"Asia/Hong_Kong", 1659177614},
{"Asia/Amman", 1659177614},
{"Asia/Beirut", 1659177614},
{"Asia/Yakutsk", 1659177614},
{"Asia/Colombo", 1659177614},
{"Asia/Oral", 1659177614},
{"Asia/Kathmandu", 1659177614},
{"Asia/Bishkek", 1659177614},
{"Asia/Hebron", 1659177614},
{"Asia/Singapore", 1659177614},
{"Asia/Atyrau", 1659177614},
{"Asia/Khandyga", 1659177614},
{"Asia/Vientiane", 1659177614},
{"Asia/Jakarta", 1659177614},
{"Asia/Dushanbe", 1659177614},
{"Asia/Seoul", 1659177614},
{"Asia/Pyongyang", 1659177614},
{"Asia/Urumqi", 1659177614},
{"Asia/Anadyr", 1659177614},
{"PST8PDT", 1659177614},
{"HST", 1659177614},
{"EST5EDT", 1659177614},
};
#endif
\ No newline at end of file
此差异已折叠。
此差异已折叠。
/**
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __TIME_TEST_DATA_H__
#define __TIME_TEST_DATA_H__
#include <stdlib.h>
#include <string.h>
#include <time.h>
#define TIME_ZONE_SUB_TAG '/'
struct time_test_string_struct {
const char *tz;
const char *result;
};
struct time_test_double_struct {
const char *tz;
const double result;
};
struct time_test_time_struct {
const char *tz;
const time_t result;
};
static const char *test_handle_path(const char *tz)
{
const char *p = tz;
if (tz) {
#ifdef TIME_ZONE_SUB_TAG
char *str = strrchr(tz, TIME_ZONE_SUB_TAG);
if (str) {
p = ++str;
}
#endif
}
return p;
}
#endif
/**
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __TIMEGM_DATA_H__
#define __TIMEGM_DATA_H__
#include "time_test_data.h"
static const struct time_test_time_struct test_timegm_data[] = {
{"Pacific/Rarotonga", 1659141614},
{"Pacific/Wake", 1659220814},
{"Pacific/Tarawa", 1659220814},
{"Pacific/Fakaofo", 1659224414},
{"Pacific/Apia", 1659224414},
{"Pacific/Kwajalein", 1659220814},
{"Pacific/Tahiti", 1659141614},
{"Pacific/Easter", 1659156014},
{"Pacific/Tongatapu", 1659224414},
{"Pacific/Guadalcanal", 1659217214},
{"Pacific/Chuuk", 1659213614},
{"Pacific/Pitcairn", 1659148814},
{"Pacific/Pohnpei", 1659217214},
{"Pacific/Fiji", 1659220814},
{"Pacific/Majuro", 1659220814},
{"Pacific/Kiritimati", 1659228014},
{"Pacific/Port_Moresby", 1659213614},
{"Pacific/Galapagos", 1659156014},
{"Pacific/Saipan", 1659213614},
{"Pacific/Marquesas", 1659143414},
{"Pacific/Wallis", 1659220814},
{"Pacific/Palau", 1659210014},
{"Pacific/Bougainville", 1659217214},
{"Pacific/Honolulu", 1659141614},
{"Pacific/Noumea", 1659217214},
{"Pacific/Pago_Pago", 1659138014},
{"Pacific/Guam", 1659213614},
{"Pacific/Auckland", 1659220814},
{"Pacific/Norfolk", 1659217214},
{"Pacific/Kosrae", 1659217214},
{"Pacific/Nauru", 1659220814},
{"Pacific/Chatham", 1659223514},
{"Pacific/Efate", 1659217214},
{"Pacific/Midway", 1659138014},
{"Pacific/Niue", 1659138014},
{"Pacific/Enderbury", 1659224414},
{"Pacific/Funafuti", 1659220814},
{"Pacific/Gambier", 1659145214},
{"EET", 1659188414},
{"MST", 1659152414},
{"Europe/Dublin", 1659181214},
{"Europe/Minsk", 1659188414},
{"Europe/Budapest", 1659184814},
{"Europe/Riga", 1659188414},
{"Europe/Jersey", 1659181214},
{"Europe/London", 1659181214},
{"Europe/Istanbul", 1659188414},
{"Europe/Moscow", 1659188414},
{"Europe/Chisinau", 1659188414},
{"Europe/Andorra", 1659184814},
{"Europe/Vaduz", 1659184814},
{"Europe/Zaporozhye", 1659188414},
{"Europe/San_Marino", 1659184814},
{"Europe/Monaco", 1659184814},
{"Europe/Ulyanovsk", 1659192014},
{"Europe/Isle_of_Man", 1659181214},
{"Europe/Tirane", 1659184814},
{"Europe/Vatican", 1659184814},
{"Europe/Belgrade", 1659184814},
{"Europe/Paris", 1659184814},
{"Europe/Nicosia", 1659188414},
{"Europe/Athens", 1659188414},
{"Europe/Malta", 1659184814},
{"Europe/Astrakhan", 1659192014},
{"Europe/Bratislava", 1659184814},
{"Europe/Uzhgorod", 1659188414},
{"Europe/Zurich", 1659184814},
{"Europe/Brussels", 1659184814},
{"Europe/Sofia", 1659188414},
{"Europe/Kiev", 1659188414},
{"Europe/Guernsey", 1659181214},
{"Europe/Busingen", 1659184814},
{"Europe/Copenhagen", 1659184814},
{"Europe/Skopje", 1659184814},
{"Europe/Luxembourg", 1659184814},
{"Europe/Lisbon", 1659181214},
{"Europe/Saratov", 1659192014},
{"Europe/Zagreb", 1659184814},
{"Europe/Simferopol", 1659188414},
{"Europe/Amsterdam", 1659184814},
{"Europe/Oslo", 1659184814},
{"Europe/Samara", 1659192014},
{"Europe/Warsaw", 1659184814},
{"Europe/Prague", 1659184814},
{"Europe/Vienna", 1659184814},
{"Europe/Mariehamn", 1659188414},
{"Europe/Gibraltar", 1659184814},
{"Europe/Stockholm", 1659184814},
{"Europe/Tallinn", 1659188414},
{"Europe/Kaliningrad", 1659184814},
{"Europe/Podgorica", 1659184814},
{"Europe/Kirov", 1659188414},
{"Europe/Helsinki", 1659188414},
{"Europe/Sarajevo", 1659184814},
{"Europe/Rome", 1659184814},
{"Europe/Bucharest", 1659188414},
{"Europe/Berlin", 1659184814},
{"Europe/Volgograd", 1659188414},
{"Europe/Ljubljana", 1659184814},
{"Europe/Vilnius", 1659188414},
{"Europe/Madrid", 1659184814},
{"Antarctica/Casey", 1659217214},
{"Antarctica/Macquarie", 1659213614},
{"Antarctica/Rothera", 1659166814},
{"Antarctica/Vostok", 1659199214},
{"Antarctica/Davis", 1659202814},
{"Antarctica/Troll", 1659184814},
{"Antarctica/Mawson", 1659195614},
{"Antarctica/McMurdo", 1659220814},
{"Antarctica/DumontDUrville", 1659213614},
{"Antarctica/Palmer", 1659166814},
{"Antarctica/Syowa", 1659188414},
{"WET", 1659181214},
{"CST6CDT", 1659159614},
{"MET", 1659184814},
{"Arctic/Longyearbyen", 1659184814},
{"Atlantic/Faroe", 1659181214},
{"Atlantic/Madeira", 1659181214},
{"Atlantic/Canary", 1659181214},
{"Atlantic/Reykjavik", 1659177614},
{"Atlantic/St_Helena", 1659177614},
{"Atlantic/South_Georgia", 1659170414},
{"Atlantic/Azores", 1659177614},
{"Atlantic/Bermuda", 1659166814},
{"Atlantic/Stanley", 1659166814},
{"Atlantic/Cape_Verde", 1659174014},
{"Africa/Niamey", 1659181214},
{"Africa/Algiers", 1659181214},
{"Africa/Maputo", 1659184814},
{"Africa/Johannesburg", 1659184814},
{"Africa/Addis_Ababa", 1659188414},
{"Africa/Malabo", 1659181214},
{"Africa/Cairo", 1659184814},
{"Africa/Bissau", 1659177614},
{"Africa/Ndjamena", 1659181214},
{"Africa/Tunis", 1659181214},
{"Africa/Harare", 1659184814},
{"Africa/El_Aaiun", 1659181214},
{"Africa/Kampala", 1659188414},
{"Africa/Libreville", 1659181214},
{"Africa/Blantyre", 1659184814},
{"Africa/Brazzaville", 1659181214},
{"Africa/Bangui", 1659181214},
{"Africa/Luanda", 1659181214},
{"Africa/Freetown", 1659177614},
{"Africa/Casablanca", 1659181214},
{"Africa/Conakry", 1659177614},
{"Africa/Kinshasa", 1659181214},
{"Africa/Dakar", 1659177614},
{"Africa/Ouagadougou", 1659177614},
{"Africa/Nouakchott", 1659177614},
{"Africa/Monrovia", 1659177614},
{"Africa/Kigali", 1659184814},
{"Africa/Windhoek", 1659184814},
{"Africa/Juba", 1659184814},
{"Africa/Sao_Tome", 1659177614},
{"Africa/Banjul", 1659177614},
{"Africa/Mbabane", 1659184814},
{"Africa/Asmara", 1659188414},
{"Africa/Djibouti", 1659188414},
{"Africa/Tripoli", 1659184814},
{"Africa/Ceuta", 1659184814},
{"Africa/Khartoum", 1659184814},
{"Africa/Bamako", 1659177614},
{"Africa/Porto-Novo", 1659181214},
{"Africa/Mogadishu", 1659188414},
{"Africa/Abidjan", 1659177614},
{"Africa/Lusaka", 1659184814},
{"Africa/Lagos", 1659181214},
{"Africa/Lubumbashi", 1659184814},
{"Africa/Nairobi", 1659188414},
{"Africa/Accra", 1659177614},
{"Africa/Maseru", 1659184814},
{"Africa/Lome", 1659177614},
{"Africa/Douala", 1659181214},
{"Africa/Bujumbura", 1659184814},
{"Africa/Dar_es_Salaam", 1659188414},
{"Africa/Gaborone", 1659184814},
{"Australia/Adelaide", 1659211814},
{"Australia/Broken_Hill", 1659211814},
{"Australia/Perth", 1659206414},
{"Australia/Darwin", 1659211814},
{"Australia/Lord_Howe", 1659215414},
{"Australia/Hobart", 1659213614},
{"Australia/Brisbane", 1659213614},
{"Australia/Sydney", 1659213614},
{"Australia/Lindeman", 1659213614},
{"Australia/Melbourne", 1659213614},
{"Australia/Eucla", 1659209114},
{"America/Grand_Turk", 1659163214},
{"America/St_Thomas", 1659163214},
{"America/Havana", 1659163214},
{"America/Thunder_Bay", 1659163214},
{"America/Inuvik", 1659156014},
{"America/Winnipeg", 1659159614},
{"America/Maceio", 1659166814},
{"America/Chihuahua", 1659156014},
{"America/North_Dakota/Beulah", 1659159614},
{"America/North_Dakota/Center", 1659159614},
{"America/North_Dakota/New_Salem", 1659159614},
{"America/Campo_Grande", 1659163214},
{"America/Scoresbysund", 1659177614},
{"America/Tijuana", 1659152414},
{"America/Bahia", 1659166814},
{"America/St_Vincent", 1659163214},
{"America/Creston", 1659152414},
{"America/Dawson", 1659152414},
{"America/Tegucigalpa", 1659156014},
{"America/Lima", 1659159614},
{"America/Mexico_City", 1659159614},
{"America/Dominica", 1659163214},
{"America/Atikokan", 1659159614},
{"America/Port-au-Prince", 1659163214},
{"America/Yakutat", 1659148814},
{"America/St_Kitts", 1659163214},
{"America/Guatemala", 1659156014},
{"America/St_Barthelemy", 1659163214},
{"America/Vancouver", 1659152414},
{"America/Jamaica", 1659159614},
{"America/Whitehorse", 1659152414},
{"America/Asuncion", 1659163214},
{"America/Toronto", 1659163214},
{"America/Hermosillo", 1659152414},
{"America/Denver", 1659156014},
{"America/Mazatlan", 1659156014},
{"America/Iqaluit", 1659163214},
{"America/Nuuk", 1659170414},
{"America/Cayenne", 1659166814},
{"America/Santarem", 1659166814},
{"America/Noronha", 1659170414},
{"America/Ojinaga", 1659156014},
{"America/Fort_Nelson", 1659152414},
{"America/Aruba", 1659163214},
{"America/Indiana/Vevay", 1659163214},
{"America/Indiana/Marengo", 1659163214},
{"America/Indiana/Indianapolis", 1659163214},
{"America/Indiana/Tell_City", 1659159614},
{"America/Indiana/Petersburg", 1659163214},
{"America/Indiana/Winamac", 1659163214},
{"America/Indiana/Knox", 1659159614},
{"America/Indiana/Vincennes", 1659163214},
{"America/Cayman", 1659159614},
{"America/Sao_Paulo", 1659166814},
{"America/Curacao", 1659163214},
{"America/Anchorage", 1659148814},
{"America/Guyana", 1659163214},
{"America/Rankin_Inlet", 1659159614},
{"America/Antigua", 1659163214},
{"America/Juneau", 1659148814},
{"America/Merida", 1659159614},
{"America/Punta_Arenas", 1659166814},
{"America/Moncton", 1659166814},
{"America/Fortaleza", 1659166814},
{"America/Resolute", 1659159614},
{"America/Nassau", 1659163214},
{"America/Edmonton", 1659156014},
{"America/Regina", 1659156014},
{"America/Halifax", 1659166814},
{"America/Danmarkshavn", 1659177614},
{"America/Metlakatla", 1659148814},
{"America/Guadeloupe", 1659163214},
{"America/Caracas", 1659163214},
{"America/Detroit", 1659163214},
{"America/Matamoros", 1659159614},
{"America/Glace_Bay", 1659166814},
{"America/Phoenix", 1659152414},
{"America/La_Paz", 1659163214},
{"America/Swift_Current", 1659156014},
{"America/Nipigon", 1659163214},
{"America/Cancun", 1659159614},
{"America/Port_of_Spain", 1659163214},
{"America/Kralendijk", 1659163214},
{"America/Grenada", 1659163214},
{"America/Belem", 1659166814},
{"America/Managua", 1659156014},
{"America/Adak", 1659145214},
{"America/St_Lucia", 1659163214},
{"America/Rio_Branco", 1659159614},
{"America/Santiago", 1659163214},
{"America/Puerto_Rico", 1659163214},
{"America/Miquelon", 1659170414},
{"America/Cuiaba", 1659163214},
{"America/Martinique", 1659163214},
{"America/Argentina/Buenos_Aires", 1659166814},
{"America/Argentina/San_Luis", 1659166814},
{"America/Argentina/Catamarca", 1659166814},
{"America/Argentina/Jujuy", 1659166814},
{"America/Argentina/Salta", 1659166814},
{"America/Argentina/Ushuaia", 1659166814},
{"America/Argentina/Mendoza", 1659166814},
{"America/Argentina/Rio_Gallegos", 1659166814},
{"America/Argentina/Tucuman", 1659166814},
{"America/Argentina/San_Juan", 1659166814},
{"America/Argentina/Cordoba", 1659166814},
{"America/Argentina/La_Rioja", 1659166814},
{"America/Barbados", 1659163214},
{"America/Monterrey", 1659159614},
{"America/Thule", 1659166814},
{"America/Montserrat", 1659163214},
{"America/Guayaquil", 1659159614},
{"America/St_Johns", 1659168614},
{"America/Boise", 1659156014},
{"America/Manaus", 1659163214},
{"America/Nome", 1659148814},
{"America/Goose_Bay", 1659166814},
{"America/Belize", 1659156014},
{"America/Sitka", 1659148814},
{"America/Dawson_Creek", 1659152414},
{"America/Recife", 1659166814},
{"America/Kentucky/Louisville", 1659163214},
{"America/Kentucky/Monticello", 1659163214},
{"America/New_York", 1659163214},
{"America/Tortola", 1659163214},
{"America/Chicago", 1659159614},
{"America/Pangnirtung", 1659163214},
{"America/Boa_Vista", 1659163214},
{"America/Bogota", 1659159614},
{"America/Rainy_River", 1659159614},
{"America/El_Salvador", 1659156014},
{"America/Bahia_Banderas", 1659159614},
{"America/Yellowknife", 1659156014},
{"America/Montevideo", 1659166814},
{"America/Cambridge_Bay", 1659156014},
{"America/Panama", 1659159614},
{"America/Santo_Domingo", 1659163214},
{"America/Anguilla", 1659163214},
{"America/Paramaribo", 1659166814},
{"America/Marigot", 1659163214},
{"America/Menominee", 1659159614},
{"America/Blanc-Sablon", 1659163214},
{"America/Costa_Rica", 1659156014},
{"America/Los_Angeles", 1659152414},
{"America/Lower_Princes", 1659163214},
{"America/Eirunepe", 1659159614},
{"America/Araguaina", 1659166814},
{"America/Porto_Velho", 1659163214},
{"EST", 1659159614},
{"CET", 1659184814},
{"MST7MDT", 1659156014},
{"Indian/Chagos", 1659199214},
{"Indian/Kerguelen", 1659195614},
{"Indian/Reunion", 1659192014},
{"Indian/Antananarivo", 1659188414},
{"Indian/Cocos", 1659201014},
{"Indian/Mauritius", 1659192014},
{"Indian/Christmas", 1659202814},
{"Indian/Maldives", 1659195614},
{"Indian/Comoro", 1659188414},
{"Indian/Mahe", 1659192014},
{"Indian/Mayotte", 1659188414},
{"Asia/Novokuznetsk", 1659202814},
{"Asia/Magadan", 1659217214},
{"Asia/Yangon", 1659201014},
{"Asia/Samarkand", 1659195614},
{"Asia/Tehran", 1659193814},
{"Asia/Dili", 1659210014},
{"Asia/Yerevan", 1659192014},
{"Asia/Qatar", 1659188414},
{"Asia/Chita", 1659210014},
{"Asia/Makassar", 1659206414},
{"Asia/Hovd", 1659202814},
{"Asia/Istanbul", 1659188414},
{"Asia/Irkutsk", 1659206414},
{"Asia/Pontianak", 1659202814},
{"Asia/Qyzylorda", 1659195614},
{"Asia/Srednekolymsk", 1659217214},
{"Asia/Aden", 1659188414},
{"Asia/Kabul", 1659193814},
{"Asia/Macau", 1659206414},
{"Asia/Riyadh", 1659188414},
{"Asia/Taipei", 1659206414},
{"Asia/Manila", 1659206414},
{"Asia/Aqtau", 1659195614},
{"Asia/Thimphu", 1659199214},
{"Asia/Shanghai", 1659206414},
{"Asia/Choibalsan", 1659206414},
{"Asia/Nicosia", 1659188414},
{"Asia/Dubai", 1659192014},
{"Asia/Baku", 1659192014},
{"Asia/Kuching", 1659206414},
{"Asia/Gaza", 1659188414},
{"Asia/Jayapura", 1659210014},
{"Asia/Tokyo", 1659210014},
{"Asia/Muscat", 1659192014},
{"Asia/Kolkata", 1659197414},
{"Asia/Ho_Chi_Minh", 1659202814},
{"Asia/Tashkent", 1659195614},
{"Asia/Bangkok", 1659202814},
{"Asia/Karachi", 1659195614},
{"Asia/Krasnoyarsk", 1659202814},
{"Asia/Yekaterinburg", 1659195614},
{"Asia/Famagusta", 1659188414},
{"Asia/Ulaanbaatar", 1659206414},
{"Asia/Bahrain", 1659188414},
{"Asia/Barnaul", 1659202814},
{"Asia/Jerusalem", 1659188414},
{"Asia/Qostanay", 1659199214},
{"Asia/Ust-Nera", 1659213614},
{"Asia/Tomsk", 1659202814},
{"Asia/Kuala_Lumpur", 1659206414},
{"Asia/Brunei", 1659206414},
{"Asia/Aqtobe", 1659195614},
{"Asia/Vladivostok", 1659213614},
{"Asia/Damascus", 1659188414},
{"Asia/Omsk", 1659199214},
{"Asia/Almaty", 1659199214},
{"Asia/Dhaka", 1659199214},
{"Asia/Tbilisi", 1659192014},
{"Asia/Baghdad", 1659188414},
{"Asia/Phnom_Penh", 1659202814},
{"Asia/Kamchatka", 1659220814},
{"Asia/Ashgabat", 1659195614},
{"Asia/Sakhalin", 1659217214},
{"Asia/Novosibirsk", 1659202814},
{"Asia/Kuwait", 1659188414},
{"Asia/Hong_Kong", 1659206414},
{"Asia/Amman", 1659188414},
{"Asia/Beirut", 1659188414},
{"Asia/Yakutsk", 1659210014},
{"Asia/Colombo", 1659197414},
{"Asia/Oral", 1659195614},
{"Asia/Kathmandu", 1659198314},
{"Asia/Bishkek", 1659199214},
{"Asia/Hebron", 1659188414},
{"Asia/Singapore", 1659206414},
{"Asia/Atyrau", 1659195614},
{"Asia/Khandyga", 1659210014},
{"Asia/Vientiane", 1659202814},
{"Asia/Jakarta", 1659202814},
{"Asia/Dushanbe", 1659195614},
{"Asia/Seoul", 1659210014},
{"Asia/Pyongyang", 1659210014},
{"Asia/Urumqi", 1659199214},
{"Asia/Anadyr", 1659220814},
{"PST8PDT", 1659152414},
{"HST", 1659141614},
{"EST5EDT", 1659163214},
};
#endif
\ No newline at end of file
......@@ -16,6 +16,7 @@
#include <stdlib.h>
#include <time.h>
#include "functionalext.h"
#include "timegm_data.h"
#define __TEST_DATA_YEAR__ 121
#define __TEST_DATA_MONTH__ 9
......@@ -43,18 +44,12 @@ static const struct time_struct gResultData[] = {
void time_0100(void)
{
for (int32_t i = 0; i < (int32_t)(sizeof(gResultData) / sizeof(gResultData[0])); i++) {
const char *tz = gResultData[i].tz;
const char *handlerChar;
#ifdef TIME_ZONE_SUB_TAG
char *str = strrchr(tz, TIME_ZONE_SUB_TAG);
if (str) {
handlerChar = ++str;
} else {
handlerChar = tz;
const char *handlerChar = test_handle_path(gResultData[i].tz);
if (!handlerChar) {
t_error("time_0100 failed: handlerChar is NULL\n");
continue;
}
#else
handlerChar = tz;
#endif
setenv("TZ", handlerChar, 1);
tzset();
system("date '2021-10-3 9:12:12' > /dev/NULL");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册