Esempio n. 1
0
 def calculate_token_expiration_date(self):
     date = shiftByMonths( datetime.datetime.now(), int(Config.authentication['auth_token_expiration_period']) )
     return datetime_to_sql(date)
Esempio n. 2
0
def test_datetime_to_sql():
    dt = datetime.datetime(2016, 1, 1, 12, 12, 12, 0, TZ_UTC)
    assert datetime_utils.datetime_to_sql(dt) == "2016-01-01T12:12:12+0000"