Sunday 15 July 2018

Moment Timezone returns correct timezone but with wrong spelling

I am using MomentJS Timezone. However, when I do moment.tz.guess(), it returns my timezone with wrong spelling.

const timezone = moment.tz.guess();
console.log(timezone); //returns Asia/Katmandu instead of Asia/Kathmandu

Yes, I could've just edited the js file and corrected the spelling but I'm afraid it's same for other countries too. Since I will be unaware of it, this might degrade the user experience!

Is this behavior expected or is there any way to fix it?



from Moment Timezone returns correct timezone but with wrong spelling

No comments:

Post a Comment