aboutsummaryrefslogtreecommitdiff
path: root/src/Watcher/time_operations.py
diff options
context:
space:
mode:
authorLibravatar Waishnav <waishnavdeore@gmail.com>2022-09-17 06:39:45 +0530
committerLibravatar Waishnav <waishnavdeore@gmail.com>2022-09-17 06:39:45 +0530
commitf0636d1ac0201686b22f252f3b7eaba7879553b6 (patch)
treec9853a75734ca2803623a83d295659d37bafdf35 /src/Watcher/time_operations.py
parent9fd05fa5f70164aaa7df70bdf4b6b467f7108f22 (diff)
downloadshopno-os-log-sync-f0636d1ac0201686b22f252f3b7eaba7879553b6.tar.gz
shopno-os-log-sync-f0636d1ac0201686b22f252f3b7eaba7879553b6.zip
compensating error value changed
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