manuelmhtr / countries-and-timezones

Minimalistic library to work with countries and timezones data
MIT License
224 stars 67 forks source link

Country code BV doesn't have a timezone assigned #31

Closed bb-media closed 3 years ago

bb-media commented 3 years ago

It exists in the country list, but does not exist in the data returned from .getAllTimezones() method

manuelmhtr commented 3 years ago

Hi @bb-media I made some research and BV (Bouvet Island) is not a sovereign country but an uninhabited Norwegian territory. It has not any timezone assigned (it shares timezone with Oslo).

Then, the best would be deleting BV from the list of countries.

bb-media commented 3 years ago

@manuelmhtr thanks for the reply. In fact our use case allows for BV to be assigned as a country, with a time zone applied. For now our internal fix is to inject it into the data returned by the library, but perhaps a good solution for this use case would to be to just assign it to the Oslo time zone?

manuelmhtr commented 3 years ago

@bb-media you are right. There are timezones like Oslo which can be assigned to multiple countries. I just released version v3.0.0, which supports multiple countries per timezone and includes a timezone for BV.

cbm-egoubely commented 1 year ago

Hello @manuelmhtr, we are still experiencing the issue in 3.4.0, e.g.

const ct = require('countries-and-timezones');

const country = ct.getCountry('BV');

console.log(country);
// { id: 'BV', name: 'Bouvet Island', timezones: [] }

Is it normal or am I missing something?