Merge pull request #691 from c9s/fix/sync-time

fix: fix sync since time field check
This commit is contained in:
Yo-An Lin 2022-06-08 13:04:39 +08:00 committed by GitHub
commit 4fdee25a96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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 {