Commit fbde7df4 authored by astaxie's avatar astaxie

Merge pull request #106 from miraclesu/form

Fix utils test fail
parents 69096b09 914b6fa9
......@@ -8,11 +8,12 @@ import (
func TestWebTime(t *testing.T) {
ts := "Fri, 26 Jul 2013 12:27:42 CST"
tt, _ := time.Parse(time.RFC1123, ts)
l, _ := time.LoadLocation("GST")
tt, _ := time.ParseInLocation(time.RFC1123, ts, l)
if ts != webTime(tt) {
t.Error("should be equal")
}
if "Fri, 26 Jul 2013 04:27:42 GMT" != webTime(tt.UTC()) {
if "Fri, 26 Jul 2013 12:27:42 GMT" != webTime(tt.UTC()) {
t.Error("should be equal")
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment