DateType

From MediaMonkey Wiki
Revision as of 19:46, 15 April 2012 by Mcow (talk | contribs) (fixed erroneous use of BBCode)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

DateType is a date-identifier. At base, it is a floating-point number expressing seconds since the epoch (nominally 1-Jan-1970 0:00 UTC).

In Python, properties of this value will be returned as PyTime objects. It can be converted to a timestamp using float() or int():

lpDate = track.DatePlayed
timestamp = float(lpDate)  # or int(lpDate)
dateobj = datetime.utcfromtimestamp(timestamp)