How to get time zone name from an offset?

后端 未结 2 475
一个人的身影
一个人的身影 2020-12-02 03:00

I am using moment timezone for timezone calculations . All i have some offset data coming from db like GMT,GMT+1,GMT+2,GMT+3,GMT+4 etc

Is their anyway i could get th

相关标签:
2条回答
  • 2020-12-02 03:27

    I don't mean to be rude, but seriously - How many times and how loudly do I have to shout this?

    Time Zone != Offset

    I mean - it's only in the timezone tag header, and the body of the timezone tag wiki:

    ...

    And it's not like I haven't already answered this question, or this one, or affffded it to the best practices doc, or littered what must be hundreds of other posts with "Time Zone != Offset" comments...

    I know, maybe I'll go talk about this at a high profile developer conference with "Time Zone != Offset" on my shirt just so it sinks in. Oh wait - done that already too.

    Apologies in advance for the snarky answer, but close as duplicate of duplicate of duplicate just wasn't as much fun.

    0 讨论(0)
  • 2020-12-02 03:36

    Have you tried http://momentjs.com/timezone/ already ?

    Not 100% sure but I think this is what you are looking for.

    0 讨论(0)
提交回复
热议问题