We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 128d733f authored by clint's avatar clint

import.py shouldn't convert to the wrong timezone

parent a4a07091
......@@ -47,7 +47,7 @@ post_data = []
for line in file(data):
artist,track,timestamp = line.strip().split("\t")
dt = datetime.strptime(timestamp, "%Y-%m-%dT%H:%M:%SZ")
timestamp = str(int(time.mktime(dt.timetuple())))
timestamp = str(int(time.mktime(dt.utctimetuple())))
post_data += [('a[%d]' % i, artist), ('t[%d]' % i, track),
('i[%d]' % i, timestamp)]
print "Adding to post %s playing %s" % (artist, track)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment