Skip to content
Snippets Groups Projects
Verified Commit 35ddcd09 authored by David Hoese's avatar David Hoese
Browse files

Fix imports of mytime functions migrated from metobscommon.data

parent 18100e99
No related branches found
No related tags found
No related merge requests found
......@@ -45,7 +45,7 @@ import time
import logging
from datetime import datetime, timedelta
from metobscommon.data.data_time import hhmm_to_offset
from metobscommon.util.mytime import hhmm_to_offset
from aosstower.schema import database
LOG = logging.getLogger(__name__)
......
......@@ -7,7 +7,7 @@ from datetime import datetime, timedelta
import rrdtool
from metobscommon.data.calc import altimeter, dewpoint, wind_vector_components
from metobscommon.data.data_time import to_unix_timestamp
from metobscommon.util.mytime import to_epoch
from aosstower import station
......@@ -42,7 +42,7 @@ def initialize_rrd(filepath, start=None, days=365, data_interval=5):
assert not os.path.exists(filepath), "DB already exists"
start = start or (datetime.utcnow() - timedelta(days=days))
# normalize start to data interval
secs = to_unix_timestamp(start)
secs = to_epoch(start)
secs -= secs % data_interval
rrdtool.create(filepath,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment