Closed linuxlurak closed 2 weeks ago
Use it like this:
local_timestamp = weigh_in_date.strftime('%Y-%m-%dT%H:%M:%S') gmt_timestamp = weigh_in_date.astimezone(timezone.utc).strftime('%Y-%m-%dT%H:%M:%S')
client.add_weigh_in_with_timestamps( weight=weight, unitKey=unit, dateTimestamp=local_timestamp, gmtTimestamp=gmt_timestamp )
needs: from datetime import datetime, timezone
Thank you @linuxlurak !
Use it like this:
local_timestamp = weigh_in_date.strftime('%Y-%m-%dT%H:%M:%S') gmt_timestamp = weigh_in_date.astimezone(timezone.utc).strftime('%Y-%m-%dT%H:%M:%S')
client.add_weigh_in_with_timestamps( weight=weight, unitKey=unit, dateTimestamp=local_timestamp, gmtTimestamp=gmt_timestamp )
needs: from datetime import datetime, timezone