diff options
| author | Carl Hetherington <cth@carlh.net> | 2019-09-08 01:49:52 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2019-09-08 01:49:52 +0100 |
| commit | 926b27dd7550dcb103ad7d6c8bbc7d00eb78589b (patch) | |
| tree | afefe6ffc73cc6aeb544ca37ab0740c3633f7631 | |
| parent | f75abce28a26c550d156ceb012b0f083ac2068b0 (diff) | |
New hack.v2.15.18
| -rwxr-xr-x | hacks/dcp_time_to_tc | 15 |
1 files changed, 15 insertions, 0 deletions
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)) |
