Closed andrhua closed 2 years ago
I looked at tests and figured that I misinterpreted the docs, and correct format string should be
format = "{YYYY}-{0M}-{0D} {h24}:{m}:{s}{ss}{Z:} {Zabbr} {Zname}"
However this raises new error
** (Timex.Parse.ParseError) Expected `timezone name` at line 1, column 34.
Actually parser will derive {Z:}
and {Zabbr}
from {Zname}
, so you don't need to specify them at all
format = "{YYYY}-{0M}-{0D} {h24}:{m}:{ss} {Zname}"
Steps to reproduce
Description of issue
I want to write tests verifying that timezone conversion was done correctly. Obviously I could pattern match on huge
%DateTime{}
structs filling out every field, but I thought I can just parse datetime from string.