diff --git a/decode_test.go b/decode_test.go index 0c36b33e..f760029f 100644 --- a/decode_test.go +++ b/decode_test.go @@ -16,6 +16,8 @@ age = 250 andrew = "gallant" kait = "brady" now = 1987-07-05T05:45:00Z +nowCanada = 2017-06-22T02:14:36-06:00 +nowChina = 2017-06-22T16:15:21+08:00 yesOrNo = true pi = 3.14 colors = [ diff --git a/lex.go b/lex.go index 6dee7fc7..e0a742a8 100644 --- a/lex.go +++ b/lex.go @@ -775,7 +775,7 @@ func lexDatetime(lx *lexer) stateFn { return lexDatetime } switch r { - case '-', 'T', ':', '.', 'Z': + case '-', 'T', ':', '.', 'Z', '+': return lexDatetime }