Merge pull request #106 from miraclesu/form
Fix utils test fail
Showing
1 changed file
with
3 additions
and
2 deletions
| ... | @@ -8,11 +8,12 @@ import ( | ... | @@ -8,11 +8,12 @@ import ( |
| 8 | 8 | ||
| 9 | func TestWebTime(t *testing.T) { | 9 | func TestWebTime(t *testing.T) { |
| 10 | ts := "Fri, 26 Jul 2013 12:27:42 CST" | 10 | ts := "Fri, 26 Jul 2013 12:27:42 CST" |
| 11 | tt, _ := time.Parse(time.RFC1123, ts) | 11 | l, _ := time.LoadLocation("GST") |
| 12 | tt, _ := time.ParseInLocation(time.RFC1123, ts, l) | ||
| 12 | if ts != webTime(tt) { | 13 | if ts != webTime(tt) { |
| 13 | t.Error("should be equal") | 14 | t.Error("should be equal") |
| 14 | } | 15 | } |
| 15 | if "Fri, 26 Jul 2013 04:27:42 GMT" != webTime(tt.UTC()) { | 16 | if "Fri, 26 Jul 2013 12:27:42 GMT" != webTime(tt.UTC()) { |
| 16 | t.Error("should be equal") | 17 | t.Error("should be equal") |
| 17 | } | 18 | } |
| 18 | } | 19 | } | ... | ... |
-
Please register or sign in to post a comment