You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently running the following Circuit Python according to boot_out.txt:
Adafruit CircuitPython 7.1.1 on 2022-01-14; Adafruit MagTag with ESP32S2
Board ID:adafruit_magtag_2.9_grayscale
The text was updated successfully, but these errors were encountered:
I've encountered the same challenge. I've considered converting to Epoch, then adding seconds, then back to iso, but I am seeing an inability of the ESP32 to perform math against large numbers like epoch (eg. 1660233725 + 1), likely due to the number of bits required to store such a large number, approximation may be causing this behavior. At any rate, for now I'll be storing the ISO NTP time along with an uptime seconds shift since that uptime so that on the receive side I can perform the time shift calculation associated with the samples.
I've considered converting to Epoch, then adding seconds, then back to iso, but I am seeing an inability of the ESP32 to perform math against large numbers like epoch (eg. 1660233725 + 1), likely due to the number of bits required to store such a large number, approximation may be causing this behavior.
Yeah that happens with floats (which unfortunately .timestamp() is) not ints, due to floats being stored in 30 bits (and there is no support for double). Circuitpython supports long ints (of arbitrary length) - except on some SAMD21 boards.
I'm trying to calculate tomorrow's date.
The approach I'm taking is as follows:
adate = adafruit_datetime.date (2022, 03, 31)
delta = adafruit_datetime.timedelta(days=1)
bdate = adate + delta
I then get the following error:
Traceback (most recent call last):
File "", line 1, in
TypeError: unsupported types for add: 'date', 'timedelta'
Looking for the functionality provided by the datetime module as documented in the supported operations section here:
https://docs.python.org/3/library/datetime.html#datetime.date.day
Currently running the following Circuit Python according to boot_out.txt:
Adafruit CircuitPython 7.1.1 on 2022-01-14; Adafruit MagTag with ESP32S2
Board ID:adafruit_magtag_2.9_grayscale
The text was updated successfully, but these errors were encountered: