Commit 2e50b6d0 authored by Sikhin VC's avatar Sikhin VC

added datetime change API

parent 8fdaf41b
Pipeline #69362 canceled with stage
...@@ -37,7 +37,7 @@ url = GET_JANUS_DETAILS + DEPLOYMENT_ID ...@@ -37,7 +37,7 @@ url = GET_JANUS_DETAILS + DEPLOYMENT_ID
EDGE_CONFIG = requests.get(url).json()["data"] EDGE_CONFIG = requests.get(url).json()["data"]
LAST_COUNT = requests.get(url).json()["latest_count"] LAST_COUNT = requests.get(url).json()["latest_count"]
date_url = "http://192.168.3.181/camera_api/get_curr_datetime" date_url = "http://192.168.3.181/camera_api/get_curr_datetime"
DATE_TIME = requests.get(date_url).json()["current_time"] DATE_TIME = tuple(requests.get(date_url).json()["current_time"])
if not LAST_COUNT: if not LAST_COUNT:
LAST_COUNT = 0 LAST_COUNT = 0
......
...@@ -61,7 +61,14 @@ class CementBagCounter(ModelWrapper): ...@@ -61,7 +61,14 @@ class CementBagCounter(ModelWrapper):
self.set_time(DATE_TIME) self.set_time(DATE_TIME)
def set_time(self, time_tuple): def set_time(self, time_tuple):
time_tuple = (2012, # Year
9, # Month
6, # Day
0, # Hour
38, # Minute
0, # Second
0, # Millisecond
)
# /usr/include/linux/time.h: # /usr/include/linux/time.h:
# #
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment