From 926b27dd7550dcb103ad7d6c8bbc7d00eb78589b Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 8 Sep 2019 01:49:52 +0100 Subject: [PATCH] New hack. --- hacks/dcp_time_to_tc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 hacks/dcp_time_to_tc diff --git a/hacks/dcp_time_to_tc b/hacks/dcp_time_to_tc new file mode 100755 index 000000000..bfb396678 --- /dev/null +++ b/hacks/dcp_time_to_tc @@ -0,0 +1,15 @@ +#!/usr/bin/python3 + +import sys + +TICKS = 96000 + +in_time = int(sys.stdin.readline()) +h = in_time // (TICKS * 60 * 60) +in_time -= h * (TICKS * 60 * 60) +m = in_time // (TICKS * 60) +in_time -= m * (TICKS * 60) +s = in_time // TICKS +in_time -= s * TICKS + +print('%02d:%02d:%02d' % (h, m, s)) -- 2.30.2