heartandsole.Activity.timestamp.ensure_aware

Activity.timestamp.ensure_aware(tz_local='UTC')[source]

Ensure all recognized timestamp data is timezone-aware.

This alters (in-place) the Activity’s records, laps, and summary entries that are recognized by this field accessor.

There’s nothing wrong with having timezone-naive timestamps and assuming the dates are in a particular timezone. However, if the local date matters (eg evening activities recorded in the US will show up with the next day’s UTC timestamp), timestamps must be made timezone-aware.

Parameters

tz_local (str, pytz.timezone, dateutil.tz.tzfile) – Time zone for time which timestamps will be converted to. Default ‘UTC’.

Returns

None