The goal of this tool is to be able to create a widget as many as the user wanted and this widget contains a clock. A digital clock of course that displays time for various timezones. It aims to be easy to use and easy to add and remove widgets.
The wonderful thing is that it allows saving the widgets to that when the user visits the page again, those saved widgets are displayed. It allows the user to display only the necessary timezone.
new Date().getTime() is also in UTC format. Given that I know the offset between UTC and the target timezone, it is possible to display date/time on that target timezone using the offset.
For example, if the target timezones are having +5hours and -3hours offset, all I have to do is generate a UTC date in milliseconds, then add the offset, then there we are.
Show me some codes
Here is some pseudo codes.
Actual page and credits
See it in action here:
Although there are many sites that I took inspirations for creating this cute tool, one most notable is “The World Clock – Time Zones” page.
Enjoy and share.