Thanks to visit codestin.com
Credit goes to github.com

Skip to content

rp2: time epoch differs from Pyboard and docs. #6873

Closed
@peterhinch

Description

@peterhinch

The docs state that for embedded ports the epoch is 2000.

I retrieve time from an NTP server and apply an offset of 3155673600 to convert from 1900 to 2000. This was calculated from

>>> from datetime import date
>>> (date(2000, 1, 1) - date(1900, 1, 1)).days * 24*60*60
3155673600

This produces correct results on Pyboards when passed to time.localtime(). On the rp2 it produces correct dates and times except that the year is 1991.

Is this intentional?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions