Skip to content

Commit

Permalink
Merge pull request #34 from dev-asterix/dev
Browse files Browse the repository at this point in the history
updated all tz data
  • Loading branch information
ric-v authored Jul 6, 2022
2 parents 7f659a2 + 80329a4 commit 9e5907d
Show file tree
Hide file tree
Showing 2 changed files with 134 additions and 4 deletions.
11 changes: 8 additions & 3 deletions components/HeroArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,21 @@ const HeroArea = () => {

return (
<>
<div className='text-red-600 font-semibold'>
*Disclaimer: This is a demo app. Timezones and timestamps displayed here are not accurate yet. This is still work in progress.
</div>
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 2xl:grid-cols-5 3xl:grid-cols-6 p-2 md:p-5 w-full gap-6">
{
timezones.map((tzData) => (
<Card key={tzData.name} tzData={tzData} />
))
}
</div>
<div className='text-center mt-10'>
<div className='text-red-600 font-semibold'>
*Disclaimer: This is a demo app. Timezones and timestamps displayed here are not accurate yet. This is still work in progress.
</div>
<div className='text-teal-500 font-bold'>
source: <a href="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones">wikipedia tz database</a>
</div>
</div>
</>
)
};
Expand Down
127 changes: 126 additions & 1 deletion pages/api/timezones.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { NextApiRequest, NextApiResponse } from "next"

// refence: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
// source: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
export const timezoneList = [
{ code: 'AD', name: 'Europe/Andorra', city: 'Andorra', country: 'Andorra' },
{ code: 'AE,OM', name: 'Asia/Dubai', city: 'Abu Dhabi', country: 'United Arab Emirates' },
Expand Down Expand Up @@ -210,6 +210,131 @@ export const timezoneList = [
{ code: 'PM', name: 'America/Miquelon', city: 'Miquelon', country: 'Saint Pierre and Miquelon' },
{ code: 'PN', name: 'Pacific/Pitcairn', city: 'Pitcairn', country: 'Pitcairn' },
{ code: 'PR', name: 'America/Puerto_Rico', city: 'Puerto Rico', country: 'Puerto Rico' },
{ code: 'PS', name: 'Asia/Gaza', city: 'Gaza', country: 'Palestine' },
{ code: 'PS', name: 'Asia/Hebron', city: '', country: '' },
{ code: 'PS', name: 'Asia/Gaza', city: 'Gaza', country: 'Palestine' },
{ code: 'PS', name: 'Asia/Hebron', city: 'Hebron', country: 'Palastine' },
{ code: 'PT', name: 'Atlantic/Azores', city: 'Azores', country: 'Portugal' },
{ code: 'PT', name: 'Atlantic/Madeira', city: 'Madeira Islands', country: 'Portugal' },
{ code: 'PT', name: 'Europe/Lisbon', city: 'Lisbon', country: 'Portugal' },
{ code: 'PW', name: 'Pacific/Palau', city: 'Palau', country: 'Palau' },
{ code: 'PY', name: 'America/Asuncion', city: 'Asuncion', country: 'Paraguay' },
{ code: 'QA', name: 'Asia/Qatar', city: 'Doha', country: 'Qatar' },
{ code: 'RE', name: 'Indian/Reunion', city: 'Saint-Denis', country: 'Reunion' },
{ code: 'RO', name: 'Europe/Bucharest', city: 'Bucharest', country: 'Romania' },
{ code: 'RS', name: 'Europe/Belgrade', city: 'Belgrade', country: 'Serbia' },
{ code: 'RU', name: 'Asia/Anadyr', city: 'Anadyr', country: 'Russia' },
{ code: 'RU', name: 'Asia/Barnaul', city: 'Barnaul', country: 'Russia' },
{ code: 'RU', name: 'Asia/Chita', city: 'Chita', country: 'Russia' },
{ code: 'RU', name: 'Asia/Irkutsk', city: 'Irkutsk', country: 'Russia' },
{ code: 'RU', name: 'Asia/Kamchatka', city: 'Kamchatka', country: 'Russia' },
{ code: 'RU', name: 'Asia/Krasnoyarsk', city: 'Krasnoyarsk', country: 'Russia' },
{ code: 'RU', name: 'Asia/Magadan', city: 'Magadan', country: 'Russia' },
{ code: 'RU', name: 'Asia/Novokuznetsk', city: 'Novokuznetsk', country: 'Russia' },
{ code: 'RU', name: 'Asia/Novosibirsk', city: 'Novosibirsk', country: 'Russia' },
{ code: 'RU', name: 'Asia/Omsk', city: 'Omsk', country: 'Russia' },
{ code: 'RU', name: 'Asia/Sakhalin', city: 'Sakhalin', country: 'Russia' },
{ code: 'RU', name: 'Asia/Vladivostok', city: 'Vladivostok', country: 'Russia' },
{ code: 'RU', name: 'Asia/Yakutsk', city: 'Yakutsk', country: 'Russia' },
{ code: 'RU', name: 'Asia/Yekaterinburg', city: 'Yekaterinburg', country: 'Russia' },
{ code: 'RU', name: 'Europe/Astrakhan', city: 'Astrakhan', country: 'Russia' },
{ code: 'RU', name: 'Europe/Kaliningrad', city: 'Kaliningrad', country: 'Russia' },
{ code: 'RU', name: 'Europe/Kirov', city: 'Kirov', country: 'Russia' },
{ code: 'RU', name: 'Europe/Moscow', city: 'Moscow', country: 'Russia' },
{ code: 'RU', name: 'Europe/Samara', city: 'Samara', country: 'Russia' },
{ code: 'RU', name: 'Europe/Saratov', city: 'Saratov', country: 'Russia' },
{ code: 'RU', name: 'Europe/Ulyanovsk', city: 'Ulyanovsk', country: 'Russia' },
{ code: 'RU', name: 'Europe/Volgograd', city: 'Volgograd', country: 'Russia' },
{ code: 'RU', name: 'Europe/Simferopol', city: 'Simferopol', country: 'Crimea' },
{ code: 'RW', name: 'Africa/Kigali', city: 'Kigali', country: 'Rwanda' },
{ code: 'SA', name: 'Asia/Riyadh', city: 'Riyadh', country: 'Saudi Arabia' },
{ code: 'SB', name: 'Pacific/Guadalcanal', city: 'Honiara', country: 'Solomon Islands' },
{ code: 'SC', name: 'Indian/Mahe', city: 'Mahe', country: 'Seychelles' },
{ code: 'SD', name: 'Africa/Khartoum', city: 'Khartoum', country: 'Sudan' },
{ code: 'SE', name: 'Europe/Stockholm', city: 'Stockholm', country: 'Sweden' },
{ code: 'SG', name: 'Asia/Singapore', city: 'Singapore', country: 'Singapore' },
{ code: 'SH', name: 'Atlantic/St_Helena', city: 'St. Helena', country: 'St. Helena' },
{ code: 'SI', name: 'Europe/Ljubljana', city: 'Ljubljana', country: 'Slovenia' },
{ code: 'SJ', name: 'Arctic/Longyearbyen', city: 'Longyearbyen', country: 'Svalbard' },
{ code: 'SK', name: 'Europe/Bratislava', city: 'Bratislava', country: 'Slovakia' },
{ code: 'SL', name: 'Africa/Freetown', city: 'Freetown', country: 'Sierra Leone' },
{ code: 'SM', name: 'Europe/San_Marino', city: 'San Marino', country: 'San Marino' },
{ code: 'SN', name: 'Africa/Dakar', city: 'Dakar', country: 'Senegal' },
{ code: 'SO', name: 'Africa/Mogadishu', city: 'Mogadishu', country: 'Somalia' },
{ code: 'SR', name: 'America/Paramaribo', city: 'Paramaribo', country: 'Suriname' },
{ code: 'SS', name: 'Africa/Juba', city: 'Juba', country: 'South Sudan' },
{ code: 'ST', name: 'Africa/Sao_Tome', city: 'Sao Tome', country: 'Sao Tome and Principe' },
{ code: 'SV', name: 'America/El_Salvador', city: 'San Salvador', country: 'El Salvador' },
{ code: 'SX', name: 'America/Lower_Princes', city: 'Lower Princes', country: 'Sint Maarten' },
{ code: 'SY', name: 'Asia/Damascus', city: 'Damascus', country: 'Syria' },
{ code: 'SZ', name: 'Africa/Mbabane', city: 'Mbabane', country: 'Swaziland' },
{ code: 'TC', name: 'America/Grand_Turk', city: 'Grand Turk', country: 'Turks and Caicos Islands' },
{ code: 'TD', name: 'Africa/Ndjamena', city: 'Ndjamena', country: 'Chad' },
{ code: 'TF', name: 'Indian/Kerguelen', city: 'Kerguelen', country: 'French Southern Territories' },
{ code: 'TG', name: 'Africa/Lome', city: 'Lome', country: 'Togo' },
{ code: 'TH', name: 'Asia/Bangkok', city: 'Bangkok', country: 'Thailand' },
{ code: 'TJ', name: 'Asia/Dushanbe', city: 'Dushanbe', country: 'Tajikistan' },
{ code: 'TK', name: 'Pacific/Fakaofo', city: 'Fakaofo', country: 'Tokelau' },
{ code: 'TL', name: 'Asia/Dili', city: 'Dili', country: 'Timor-Leste' },
{ code: 'TM', name: 'Asia/Ashgabat', city: 'Ashgabat', country: 'Turkmenistan' },
{ code: 'TN', name: 'Africa/Tunis', city: 'Tunis', country: 'Tunisia' },
{ code: 'TO', name: 'Pacific/Tongatapu', city: 'Tongatapu', country: 'Tonga' },
{ code: 'TR', name: 'Europe/Istanbul', city: 'Istanbul', country: 'Turkey' },
{ code: 'TT', name: 'America/Port_of_Spain', city: 'Port of Spain', country: 'Trinidad and Tobago' },
{ code: 'TV', name: 'Pacific/Funafuti', city: 'Funafuti', country: 'Tuvalu' },
{ code: 'TW', name: 'Asia/Taipei', city: 'Taipei', country: 'Taiwan' },
{ code: 'TZ', name: 'Africa/Dar_es_Salaam', city: 'Dar es Salaam', country: 'Tanzania' },
{ code: 'UA', name: 'Europe/Kiev', city: 'Kiev', country: 'Ukraine' },
{ code: 'UA', name: 'Europe/Uzhgorod', city: 'Uzhgorod', country: 'Ukraine' },
{ code: 'UA', name: 'Europe/Zaporozhye', city: 'Zaporozhye', country: 'Ukraine' },
{ code: 'UG', name: 'Africa/Kampala', city: 'Kampala', country: 'Uganda' },
{ code: 'UM', name: 'Pacific/Wake', city: 'Wake', country: 'United States Minor Outlying Islands' },
{ code: 'US', name: 'America/Adak', city: 'Adak', country: 'United States' },
{ code: 'US', name: 'America/Anchorage', city: 'Anchorage', country: 'United States' },
{ code: 'US', name: 'America/Boise', city: 'Boise', country: 'United States' },
{ code: 'US', name: 'America/Chicago', city: 'Chicago', country: 'United States' },
{ code: 'US', name: 'America/Denver', city: 'Denver', country: 'United States' },
{ code: 'US', name: 'America/Detroit', city: 'Detroit', country: 'United States' },
{ code: 'US', name: 'America/Indiana/Indianapolis', city: 'Indianapolis', country: 'United States' },
{ code: 'US', name: 'America/Indiana/Knox', city: 'Knox', country: 'United States' },
{ code: 'US', name: 'America/Indiana/Marengo', city: 'Marengo', country: 'United States' },
{ code: 'US', name: 'America/Indiana/Petersburg', city: 'Petersburg', country: 'United States' },
{ code: 'US', name: 'America/Indiana/Tell_City', city: 'Tell City', country: 'United States' },
{ code: 'US', name: 'America/Indiana/Vevay', city: 'Vevay', country: 'United States' },
{ code: 'US', name: 'America/Indiana/Vincennes', city: 'Vincennes', country: 'United States' },
{ code: 'US', name: 'America/Indiana/Winamac', city: 'Winamac', country: 'United States' },
{ code: 'US', name: 'America/Juneau', city: 'Juneau', country: 'United States' },
{ code: 'US', name: 'America/Kentucky/Louisville', city: 'Louisville', country: 'United States' },
{ code: 'US', name: 'America/Kentucky/Monticello', city: 'Monticello', country: 'United States' },
{ code: 'US', name: 'America/Los_Angeles', city: 'Los Angeles', country: 'United States' },
{ code: 'US', name: 'America/Menominee', city: 'Menominee', country: 'United States' },
{ code: 'US', name: 'America/Metlakatla', city: 'Metlakatla', country: 'United States' },
{ code: 'US', name: 'America/New_York', city: 'New York', country: 'United States' },
{ code: 'US', name: 'America/Nome', city: 'Nome', country: 'United States' },
{ code: 'US', name: 'America/North_Dakota/Beulah', city: 'Beulah', country: 'United States' },
{ code: 'US', name: 'America/North_Dakota/Center', city: 'Center', country: 'United States' },
{ code: 'US', name: 'America/North_Dakota/New_Salem', city: 'New Salem', country: 'United States' },
{ code: 'US', name: 'America/Phoenix', city: 'Phoenix', country: 'United States' },
{ code: 'US', name: 'America/Sitka', city: 'Sitka', country: 'United States' },
{ code: 'US', name: 'America/Yakutat', city: 'Yakutat', country: 'United States' },
{ code: 'UY', name: 'America/Montevideo', city: 'Montevideo', country: 'Uruguay' },
{ code: 'UZ', name: 'Asia/Samarkand', city: 'Samarkand', country: 'Uzbekistan' },
{ code: 'UZ', name: 'Asia/Tashkent', city: 'Tashkent', country: 'Uzbekistan' },
{ code: 'VA', name: 'Europe/Vatican', city: 'Vatican', country: 'Vatican City' },
{ code: 'VC', name: 'America/St_Vincent', city: 'St. Vincent', country: 'Saint Vincent and the Grenadines' },
{ code: 'VE', name: 'America/Caracas', city: 'Caracas', country: 'Venezuela' },
{ code: 'VG', name: 'America/Tortola', city: 'Tortola', country: 'British Virgin Islands' },
{ code: 'VI', name: 'America/St_Thomas', city: 'St. Thomas', country: 'United States Virgin Islands' },
{ code: 'VN', name: 'Asia/Phnom_Penh', city: 'Phnom Penh', country: 'Vietnam' },
{ code: 'VU', name: 'Pacific/Efate', city: 'Efate', country: 'Vanuatu' },
{ code: 'WF', name: 'Pacific/Wallis', city: 'Wallis', country: 'Wallis and Futuna' },
{ code: 'WS', name: 'Pacific/Apia', city: 'Apia', country: 'Samoa' },
{ code: 'WS', name: 'Pacific/Samoa', city: 'Samoa', country: 'Samoa' },
{ code: 'YE', name: 'Asia/Aden', city: 'Aden', country: 'Yemen' },
{ code: 'YT', name: 'Indian/Mayotte', city: 'Mayotte', country: 'Mayotte' },
{ code: 'ZA', name: 'Africa/Johannesburg', city: 'Johannesburg', country: 'South Africa' },
{ code: 'ZM', name: 'Africa/Lusaka', city: 'Lusaka', country: 'Zambia' },
{ code: 'ZW', name: 'Africa/Harare', city: 'Harare', country: 'Zimbabwe' }
]

export default function timezones(req: NextApiRequest, res: NextApiResponse) {
Expand Down

1 comment on commit 9e5907d

@vercel
Copy link

@vercel vercel bot commented on 9e5907d Jul 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.