Merge pull request #109 from alysivji/add_pendulum_tz

Add timezone option for parse()
This commit is contained in:
2017-12-03 13:47:31 -06:00
committed by GitHub
2 changed files with 15 additions and 3 deletions
+6
View File
@@ -178,6 +178,12 @@ def test_parse():
d = maya.parse('2016/01/05', year_first=True, day_first=True)
assert format(d) == '2016-05-01 00:00:00+00:00'
d = maya.parse('01/05/2016', timezone='UTC')
assert format(d) == '2016-01-05 00:00:00+00:00'
d = maya.parse('01/05/2016', timezone='US/Central')
assert format(d) == '2016-01-05 06:00:00+00:00'
def test_when_past():
next_month = str(maya.now().add(months=1).month)