فهرست منبع

Modify extract LOCALE sign from tags

xormplus 9 سال پیش
والد
کامیت
489e2264d4
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  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)