Files
kami_shop/internal/utils/date_time.go
danial a49e73bf33 refactor(conf): 删除未使用的配置项
- 移除了 conf/app.conf 中的 [gateway2]配置节
- 删除了 internal/config/config.go 中的 GetGateway2 和 GetRechargeTMall 函数
- 在 internal/utils/client/client.go 和 internal/integrations/scan_shop.go 中添加了请求超时设置
2025-02-23 19:33:06 +08:00

32 lines
746 B
Go

package utils
import "time"
func GetDateTimeNot() string {
return time.Now().Format("2006010215:04:05")
}
func GetDate() string {
return time.Now().Format("2006-01-02")
}
func GetBasicDateTime() string {
return time.Now().Format("2006-01-02 15:04:05")
}
func GetNowTimesTamp() string {
return time.Now().Format("20060102150405")
}
func GetDateTimeBeforeHours(hour int) string {
return time.Now().Add(-time.Hour * time.Duration(hour)).Format("2006-01-02 15:04:05")
}
func GetDateBeforeDays(days int) string {
return time.Now().Add(-time.Hour * time.Duration(days) * 24).Format("2006-01-02")
}
func GetDateTimeBeforeDays(days int) string {
return time.Now().Add(-time.Hour * time.Duration(days) * 24).Format("2006-01-02 15:04:05")
}