feat: add gormv2 and support sqlite

This commit is contained in:
engigu
2024-04-29 17:31:13 +08:00
parent 44054ae157
commit 33e44ce596
22 changed files with 236 additions and 279 deletions
+8 -2
View File
@@ -56,8 +56,14 @@ func (t *Time) Scan(v interface{}) error {
// GetNowTimeStr 获取当前的时间字符串
func GetNowTimeStr() string {
currentTimeUTC := time.Now().UTC()
chinaTime := currentTimeUTC.Add(8 * time.Hour)
chinaTime := GetNowTime()
formattedTime := chinaTime.Format("2006-01-02 15:04:05")
return formattedTime
}
// GetNowTimeStr 获取当前的时间字符串
func GetNowTime() time.Time {
currentTimeUTC := time.Now().UTC()
chinaTime := currentTimeUTC.Add(8 * time.Hour)
return chinaTime
}