Explorar el Código

Modify extract LOCALE sign from tags

xormplus hace 9 años
padre
commit
489e2264d4
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      engine.go

+ 1 - 1
engine.go

@@ -1021,7 +1021,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)