diff options
author | Manuel Ebert <manuel@1450.me> | 2014-10-21 18:27:56 +0200 |
---|---|---|
committer | Manuel Ebert <manuel@1450.me> | 2014-10-21 18:28:03 +0200 |
commit | acf41a153ad01c923f1afa230bde4544eda463ec (patch) | |
tree | 28b4030801a9e188613202f1cf43bf352e64b971 | |
parent | 19c57ecf70a48495a1bbe9704cd30805372eef84 (diff) |
Timezone parsing fix
-rw-r--r-- | features/steps/core.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/features/steps/core.py b/features/steps/core.py index c4aa2f59..9b0679e0 100644 --- a/features/steps/core.py +++ b/features/steps/core.py @@ -124,10 +124,8 @@ def check_output(context, text=None): def check_output_time_inline(context, text): out = context.stdout_capture.getvalue() local_tz = tzlocal.get_localzone() - utc_time = date_parser.parse(text) - date = utc_time + local_tz._utcoffset - local_date = date.strftime("%Y-%m-%d %H:%M") - assert local_date in out, local_date + local_time = date_parser.parse(text).astimezone(local_tz).strftime("%Y-%m-%d %H:%M") + assert local_time in out, local_time @then('the output should contain "{text}"') def check_output_inline(context, text): |