Merge pull request #437 from kaneshin/patch-2

Modify extract LOCALE sign from tags
This commit is contained in:
Lunny Xiao 2016-08-05 09:35:15 -05:00 committed by GitHub
commit c6c7056840
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":
col.TimeZone = time.Local
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)
if err != nil {
engine.logger.Error(err)