You can control the date and time.
rolex.py
# -*- coding: utf-8 -*-
from rolex import rolex
from datetime import datetime, date
print rolex.parse_datetime(0)
# 1970-01-01 00:00:00
print rolex.parse_datetime(1234567890)
# 2009-02-13 23:31:30
print rolex.parse_datetime(date(2015, 12, 24))
# 2015-12-24 00:00:00
print rolex.parse_datetime(datetime(2015, 11, 24, 20, 30))
# 2015-11-24 20:30:00
#Time display every 5 minutes
start = "2014-01-01 03:00:00"
end = "2014-01-01 03:10:00"
print rolex.time_series(start=start, end=end, freq="5min")
# [datetime.datetime(2014, 1, 1, 3, 0), datetime.datetime(2014, 1, 1, 3, 5), datetime.datetime(2014, 1, 1, 3, 10)]
Recommended Posts