heartandsole.timestring_from_time

heartandsole.timestring_from_time(time)[source]

Convert datetime into a TCX- or GPX-formatted timestamp.

Naively assumes a timezone 6 hours behind UTC - corresponds to Mountain Daylight Time.

Based on XML schema, xsd:dateTime.

Parameters

time (datetime.datetime) – The time in MDT.

Returns

Timestamp with MDT timezone info.

Return type

str