Skip to content
Snippets Groups Projects
Commit 0243f29d authored by tomrink's avatar tomrink
Browse files

snapshot...

parent 06f5900f
No related branches found
No related tags found
No related merge requests found
......@@ -51,6 +51,12 @@ def get_time_tuple_utc(timestamp):
return dt_obj, dt_obj.timetuple()
def get_timestamp(dt_str, format_code='%Y-%m-%d_%H:%M'):
dto = datetime.datetime.strptime(dt_str, format_code).replace(tzinfo=timezone.utc)
ts = dto.timestamp()
return ts
def add_time_range_to_filename(pathname, tstart, tend):
dt_obj, _ = get_time_tuple_utc(tstart)
str_start = dt_obj.strftime('%Y%m%d%H')
......
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