diff --git a/cast_test.go b/cast_test.go index 93bd4e3..c254c57 100644 --- a/cast_test.go +++ b/cast_test.go @@ -1211,6 +1211,8 @@ func TestToTime(t *testing.T) { {"2016-03-06 15:28:01", time.Date(2016, 3, 6, 15, 28, 1, 0, time.UTC), false}, {"2016-03-06 15:28:01 -0000", time.Date(2016, 3, 6, 15, 28, 1, 0, time.UTC), false}, {"2016-03-06 15:28:01 -00:00", time.Date(2016, 3, 6, 15, 28, 1, 0, time.UTC), false}, + {"2016-03-06 15:28:01 +0900", time.Date(2016, 3, 6, 6, 28, 1, 0, time.UTC), false}, + {"2016-03-06 15:28:01 +09:00", time.Date(2016, 3, 6, 6, 28, 1, 0, time.UTC), false}, {"2006-01-02", time.Date(2006, 1, 2, 0, 0, 0, 0, time.UTC), false}, {"02 Jan 2006", time.Date(2006, 1, 2, 0, 0, 0, 0, time.UTC), false}, {1472574600, time.Date(2016, 8, 30, 16, 30, 0, 0, time.UTC), false}, diff --git a/caste.go b/caste.go index 7ad7a84..c04af6a 100644 --- a/caste.go +++ b/caste.go @@ -1296,8 +1296,8 @@ var ( timeFormat{"2006-01-02 15:04:05Z07:00", timeFormatNumericTimezone}, timeFormat{"2006-01-02", timeFormatNoTimezone}, timeFormat{"02 Jan 2006", timeFormatNoTimezone}, - timeFormat{"2006-01-02 15:04:05 -07:00", 1}, - timeFormat{"2006-01-02 15:04:05 -0700", 1}, + timeFormat{"2006-01-02 15:04:05 -07:00", timeFormatNumericTimezone}, + timeFormat{"2006-01-02 15:04:05 -0700", timeFormatNumericTimezone}, timeFormat{time.Kitchen, timeFormatTimeOnly}, timeFormat{time.Stamp, timeFormatTimeOnly}, timeFormat{time.StampMilli, timeFormatTimeOnly},