Question

It seems like both functions return a number between 0 and 59.

Was it helpful?

Solution

There are a handful of timezones that are not offset by UTC by a multiple of hours, but have an additional half hour. You can see the list at Half hour time zones, and they include India, so it's not an insignificant portion of the world by any means. If you're in one of these timezones, getMinutes and getUTCMinutes of the current time will be 30 minutes different.

And there are two locations, Nepal and Chatham Islands, that have an additional 45 minutes in their offset from UTC.

OTHER TIPS

One is based on the universal time (also known as GMT) one is relative time of the client. So the base they call from is different. I did find some time zones do have partial hours, so the minutes can be different.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top