mirror of https://github.com/bjdgyc/anylink.git
删除冗余代码.
This commit is contained in:
parent
7e8eea5f80
commit
a83999013e
|
@ -43,10 +43,5 @@ func getTimeAgo(days int) string {
|
|||
ts := time.Now().AddDate(0, 0, -days)
|
||||
tsZero := time.Date(ts.Year(), ts.Month(), ts.Day(), 0, 0, 0, 0, time.Local)
|
||||
timeS = tsZero.Format(dbdata.LayoutTimeFormat)
|
||||
// UTC
|
||||
switch base.Cfg.DbType {
|
||||
case "sqlite3", "postgres":
|
||||
timeS = tsZero.UTC().Format(dbdata.LayoutTimeFormat)
|
||||
}
|
||||
return timeS
|
||||
}
|
||||
|
|
|
@ -199,12 +199,6 @@ func (s *StatsInfo) getScopeDetail(scope string) (sd *ScopeDetail) {
|
|||
}
|
||||
sd.fsTime = sd.sTime.Format(LayoutTimeFormat)
|
||||
sd.feTime = sd.eTime.Format(LayoutTimeFormat)
|
||||
// UTC
|
||||
switch base.Cfg.DbType {
|
||||
case "sqlite3", "postgres":
|
||||
sd.fsTime = sd.sTime.UTC().Format(LayoutTimeFormat)
|
||||
sd.feTime = sd.eTime.UTC().Format(LayoutTimeFormat)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue