Modify extract LOCALE sign from tags

This commit is contained in:
Shintaro Kaneko 2016-08-05 10:05:05 +00:00
parent 01a03a3092
commit edda763c13
1 changed files with 1 additions and 1 deletions

View File

@ -1016,7 +1016,7 @@ func (engine *Engine) mapType(v reflect.Value) *core.Table {
case k == "LOCAL": case k == "LOCAL":
col.TimeZone = time.Local col.TimeZone = time.Local
case strings.HasPrefix(k, "LOCALE(") && strings.HasSuffix(k, ")"): case strings.HasPrefix(k, "LOCALE(") && strings.HasSuffix(k, ")"):
location := k[len("INDEX")+1 : len(k)-1] location := k[len("LOCALE")+1 : len(k)-1]
col.TimeZone, err = time.LoadLocation(location) col.TimeZone, err = time.LoadLocation(location)
if err != nil { if err != nil {
engine.logger.Error(err) engine.logger.Error(err)