Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Which timezone to use for all users aroung the world?

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?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You can use the Intl object of the internationalization API to get the local zone string

const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading