mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
FIX: compare UTC dates to schedule backups
This commit is contained in:
parent
ea29e1c693
commit
3c2486e2ba
1 changed files with 2 additions and 2 deletions
|
@ -8,8 +8,8 @@ module Jobs
|
|||
return unless SiteSetting.automatic_backups_enabled?
|
||||
|
||||
if latest_backup = Backup.all[0]
|
||||
date = File.ctime(latest_backup.path).to_date
|
||||
return if (date + SiteSetting.backup_frequency.days) > Time.now.to_date
|
||||
date = File.ctime(latest_backup.path).getutc.to_date
|
||||
return if (date + SiteSetting.backup_frequency.days) > Time.now.utc.to_date
|
||||
end
|
||||
|
||||
Jobs.cancel_scheduled_job(:create_backup)
|
||||
|
|
Loading…
Reference in a new issue