Quantcast
Channel: Getting current hour from UTC Offset with momentjs - Stack Overflow
Browsing all 2 articles
Browse latest View live

Answer by bertilnilsson for Getting current hour from UTC Offset with momentjs

utcOffset accepts a minute-based offset value do just that. If "-1000" is referring to 10 hour offset, then -600 would be the number of minutes to offset. moment().utcOffset(-600).format('h A')

View Article



Getting current hour from UTC Offset with momentjs

I would like to convert a utc offset value (e.g. "-1000") into the given hour, (e.g. 2pm). How do I do this with mommentjs? Is there a way to do this without using momentjs timzone? I was previously...

View Article
Browsing all 2 articles
Browse latest View live




Latest Images