Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug parsing 2014.02.13 00:00:00 ? #134

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions parseany_test.go
Expand Up @@ -417,6 +417,14 @@ var testInputs = []dateTest{
{in: "1384216367111", out: "2013-11-12 00:32:47.111 +0000 UTC"},
{in: "1384216367111222", out: "2013-11-12 00:32:47.111222 +0000 UTC"},
{in: "1384216367111222333", out: "2013-11-12 00:32:47.111222333 +0000 UTC"},

// Potential bugs
{in: "2014.02.13", out: "2014-02-13 00:00:00 +0000 UTC"}, // OK: baseline for comparison
{in: "2014-02-13 00:00:00", out: "2014-02-13 00:00:00 +0000 UTC"}, // OK: parsed as expected
{in: "2014-02-13 00:00:00 utc", out: "2014-02-13 00:00:00 +0000 UTC"}, // BUG?: Looks like lowercase timezones are not supported (cannot parse "utc" as "MST")
{in: "2014.02.13 00:00:00", out: "2014-02-13 00:00:00 +0000 UTC"}, // BUG?: cannot be parsed (error is "month out of range")
{in: "2014-02-13t00:00:00.0z", out: "2014-02-13 00:00:00 +0000 UTC"}, // BUG?: cannot be parsed (error is "month out of range")

}

func TestParse(t *testing.T) {
Expand Down