Skip to content

datetime time offset converting datetime-to-timestamp-back-to-datetime  #29

Closed
@schaefer01

Description

@schaefer01

hi,

I'm using this: adafruit-circuitpython-bundle-9.x-mpy-20240625 and get a minutes and seconds offset with my conversion
Is this a me problem or a you problem?

>>> from adafruit_datetime import datetime as dt
  ... <creation of object deleted>
>>> print(dtobj) 
2025-01-15 14:09:13                                  -> note: 9 minutes 13 seconds
>>> ts = dtobj.timestamp()
>>> dt.fromtimestamp(ts)
datetime.datetime(2025, 1, 15, 14, 2, 40)  -> note: 2 minutes 40 seconds
>>> dt.fromtimestamp(ts)
datetime.datetime(2025, 1, 15, 14, 2, 40)

thank you for your consideration
bob s.

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