Open richdrich opened 5 years ago
This isn't your bug, but it's something that might be good to note in the docs.
avr-libc uses a non standard time epoch starting Midnight, Jan 1 2000 UTC, not 1-1-1970 as for unix and swrtc.
1-1-1970
So if you take a time from this library and give it to e.g. gmtime it will be 30 years out. The fix is to add or subtract UNIX_OFFSET.
gmtime
UNIX_OFFSET
Just a thought really for anyone else who might be confused by this.
This isn't your bug, but it's something that might be good to note in the docs.
avr-libc uses a non standard time epoch starting Midnight, Jan 1 2000 UTC, not
1-1-1970
as for unix and swrtc.So if you take a time from this library and give it to e.g.
gmtime
it will be 30 years out. The fix is to add or subtractUNIX_OFFSET
.Just a thought really for anyone else who might be confused by this.