Issue
Right now I am using UTC as timezone. But I am staying in Bangladesh and It is ahead of 6 hours from server time. I am using a clock as UTC timezone it is also showing me time ahead of 6 hours.
<Clock format={'HH:mm:ss'} ticking={true} timezone={'UTC'} />
Here, I want global timezone. I am in Bangladesh so I will see the bd time, if I am in Russia, then I will see time according to russia. so which timezone to use for that?
Solution
You can use the Intl
object of the internationalization API to get the local zone string
const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
Answered By - Ricardo Sanchez
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.