user5970552
user5970552

Reputation: 303

JavaScript : Convert TimeZone Offset to TimeZone String (Eg: "-5.00" to "CST")

I am getting a timezone offset as "-5.00" from a service response and I need to format it in the UI as CST. How do I convert this in JavaScript? I searched and am not sure there is any direct method in JavaScript.

Upvotes: 0

Views: 817

Answers (1)

Eric Majerus
Eric Majerus

Reputation: 1226

I would look at using Moment. It provides a full timezone library. You may be able to make use of it still depending on your requirements and situation.

http://momentjs.com/timezone/

Upvotes: 1

Related Questions