micropython-samples icon indicating copy to clipboard operation
micropython-samples copied to clipboard

ntptime time offset limited to whole hours

Open clach04 opened this issue 11 months ago • 1 comments

https://github.com/peterhinch/micropython-samples/blob/d7529baff2c1cf2ce17a50719be14c26f82b8aa7/ntptime/ntptime.py#L21

Uses hours (rather than minutes of seconds). I suspect the math later could cause odd behaviors with timezones that are not whole hours (for example India has a half hour, one of the more simple partial hours examples).

Accepting minutes or seconds is likely a more robust solution than float to int conversion.

This is mostly a note to myself, I do not yet need to support MicroPython any when than my home at the moment (which is a whole hour offset :-))

clach04 avatar Feb 22 '25 13:02 clach04

if you think half hour offsets are a problem...

Nepal Time
Time zone in Nepal (GMT+5:45) 

if we could just get rid of time zones and DST it would be so much easier

GM-Script-Writer-62850 avatar Feb 23 '25 13:02 GM-Script-Writer-62850