Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get time depending upon long form time zone name #890

Closed
SanthoshBanavath opened this issue Aug 31, 2020 · 4 comments
Closed

get time depending upon long form time zone name #890

SanthoshBanavath opened this issue Aug 31, 2020 · 4 comments

Comments

@SanthoshBanavath
Copy link

SanthoshBanavath commented Aug 31, 2020

Can we have the functionality to use the full timezone name (Eastern Standard Time, India Standard Time...etc)?
moment.tz('India Standard Time') for UTC+5:30 and so on.

@SanthoshBanavath SanthoshBanavath changed the title how to get time depending upon long form time zone name get time depending upon long form time zone name Sep 13, 2020
@icellan
Copy link

icellan commented Jul 15, 2021

This should really be in the list of timezones

@georgesiosi
Copy link

India is a pretty large part of the world. Don't know why this isn't already included? Voting +1 for getting this added.

@gilmoreorless
Copy link
Member

India is a pretty large part of the world. Don't know why this isn't already included? Voting +1 for getting this added.

@siosism This issue isn't about adding data for India; that's already available by using the id Asia/Kolkata.

From what I can see, this issue is about getting existing data by using different input strings, effectively as aliases. Unfortunately, as detailed in #760 (comment), these long-form names aren't available in the IANA time zone database that Moment Timezone relies on. Partly this is because the names change per locale. For example:

Locale Name
en (English) India Standard Time
es (Spanish) hora estándar de la India
fr (French) heure de l’Inde
de (German) Indische Zeit

To get this data into Moment Timezone correctly would require integrating the Unicode Common Locale Data Repository (CLDR). This is not a simple task, and my guess is it's way out of scope for the maintenance-only status of this project.

@ichernev
Copy link
Contributor

If you insist, just use the moment.tz.link feature and add aliases yourself (for your project), just don't expect us to maintain such a list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants