Hi, I am developing a program and I want to base the time on a world time zone online to always come up with the correct time update unlike on the users computer time that has always the possibility of wrong time output if not set correctly. Any best JavaScript solution for this?
Help, need to integrate world time zone on my program using JavaScript
Hi,
You can use the Javascript date object to return the time difference between UTC and Local Time.
The get.TimezoneOffset() method returns the time difference between UTC and local time in minutes. You can use it like
Var d = new date();
Var n = d.getTimezoneOffset();
If your timzone is GMT +2 then -120 will be returned.
Note UTC time is the same as GMT.
Regards,