]> code.delx.au - mediapc-tools/commitdiff
mythsymlink: print times in Sydney timezone instead of UTC
authorJames Bunton <jamesbunton@delx.net.au>
Mon, 26 Mar 2018 11:39:00 +0000 (22:39 +1100)
committerJames Bunton <jamesbunton@delx.net.au>
Wed, 11 Apr 2018 00:32:35 +0000 (10:32 +1000)
mythsymlink

index 42a4f9bdf45e04a151387ea1cd9b8009da9b645d..2bd754e24bbf3ddf75a843bd1616624772519ab3 100755 (executable)
@@ -51,8 +51,14 @@ recordingsdir = cursor.fetchone()["data"]
 
 # Now find all the recordings we have at the moment
 cursor.execute("""
-    SELECT title, subtitle, starttime, basename, watched FROM recorded
-""")
+    SELECT
+        title,
+        subtitle,
+        CONVERT_TZ(starttime, 'UTC', '%s') as starttime,
+        basename,
+        watched
+    FROM recorded
+""" % "Australia/Sydney")
 for row in cursor:
     title = row["title"]
     starttime = str(row["starttime"]).replace(":", "-")