Hi @thooyork ! Thanks for creating a great jQuery clock plugin. I've been using this for a current project and noticed that it lacks support for timezones with minutes offsets. There's also an existing issue about this. Kindly review my proposed implementation. :smiley:
Proposed solution will support timezones such as:
(UTC+04:30) | Kabul
(UTC-04:30) | Caracas
(UTC+06:30) | Yangon (Rangoon)
(UTC+05:30) | Chennai, Kolkata, Mumbai, New Delhi
(UTC+03:30) | Tehran
(UTC+05:45) | Kathmandu
The idea is to retain your original code and just added new functions minutesCorrection and timeCorrection. To accommodate minutes offsets, they are to be converted to hours (e.g. 30 mins -> 0.50hr, 45 mins -> 0.75hr) to retain the format needed for hourCorrection options property. For example, if the selected timezone is GMT +9:30 and the current timezone is GMT +8:00, the hourCorrection will have the value +1.50.
Hi @thooyork ! Thanks for creating a great jQuery clock plugin. I've been using this for a current project and noticed that it lacks support for timezones with minutes offsets. There's also an existing issue about this. Kindly review my proposed implementation. :smiley:
Proposed solution will support timezones such as:
The idea is to retain your original code and just added new functions
minutesCorrection
andtimeCorrection
. To accommodate minutes offsets, they are to be converted to hours (e.g. 30 mins -> 0.50hr, 45 mins -> 0.75hr) to retain the format needed forhourCorrection
options property. For example, if the selected timezone is GMT +9:30 and the current timezone is GMT +8:00, thehourCorrection
will have the value+1.50
.~ Kris ~