Skip to content

Commit

Permalink
Merge pull request #182 from anthonyfok/support-+-in-timezone
Browse files Browse the repository at this point in the history
Allow '+' in Datetime lexing
  • Loading branch information
BurntSushi committed Jun 23, 2017
2 parents b26d9c3 + 8482be6 commit 8fb9fdc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions decode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
2 changes: 1 addition & 1 deletion lex.go
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ func lexDatetime(lx *lexer) stateFn {
return lexDatetime
}
switch r {
case '-', 'T', ':', '.', 'Z':
case '-', 'T', ':', '.', 'Z', '+':
return lexDatetime
}

Expand Down

0 comments on commit 8fb9fdc

Please sign in to comment.