aboutsummaryrefslogtreecommitdiff
path: root/src/Watcher/time_operations.py
diff options
context:
space:
mode:
authorLibravatar Vaishnav Deore <86405648+Waishnav@users.noreply.github.com>2022-11-14 20:18:17 +0530
committerLibravatar GitHub <noreply@github.com>2022-11-14 20:18:17 +0530
commit20fd09803001a7e6371360afedb3091dd9242d07 (patch)
tree3b46618374f8c6bb4dec0682ecdd65176a1c260c /src/Watcher/time_operations.py
parentca1d6e1cacb4b5e3106f556f99687bc3df5af86b (diff)
parent212a5aaf5c1b2b2b956d75c4ba66c95222e31683 (diff)
downloadshopno-os-log-sync-20fd09803001a7e6371360afedb3091dd9242d07.tar.gz
shopno-os-log-sync-20fd09803001a7e6371360afedb3091dd9242d07.zip
Merge pull request #38 from Waishnav/v2.0
v2.0 ready to use
Diffstat (limited to 'src/Watcher/time_operations.py')
-rwxr-xr-xsrc/Watcher/time_operations.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Watcher/time_operations.py b/src/Watcher/time_operations.py
index 1df4922..5042983 100755
--- a/src/Watcher/time_operations.py
+++ b/src/Watcher/time_operations.py
@@ -66,4 +66,17 @@ def convert_into_sec(t):
sec = int(t[0:2])*3600 + int(t[3:5])*60 + int(t[6::])
return sec
+def convert(sec):
+ sec = int(sec)
+ sec = sec % (24 * 3600)
+ hr = sec // 3600
+ sec %= 3600
+ mn = sec // 60
+ sec %= 60
+ hr = str(hr).zfill(2)
+ mn = str(mn).zfill(2)
+ sec = str(sec).zfill(2)
+
+ result = hr + ":" + mn + ":" + sec
+ return result