fix since time field check

This commit is contained in:
c9s 2022-06-08 12:54:48 +08:00
parent cca813e5e5
commit fb5fc02bdf
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -587,7 +587,10 @@ func (environ *Environment) syncWithUserConfig(ctx context.Context, userConfig *
sessions = environ.SelectSessions(selectedSessions...)
}
since := userConfig.Sync.Since.Time()
since := time.Now().AddDate(0, -6, 0)
if userConfig.Sync.Since != nil {
since = userConfig.Sync.Since.Time()
}
for _, session := range sessions {
if err := environ.syncSession(ctx, session, syncSymbols...); err != nil {