FIX: fixes last backup/last_update dates (#6242)

This commit is contained in:
Joffrey JAFFEUX 2018-08-07 08:19:52 -04:00 committed by GitHub
parent 56d3e07206
commit 67ec81babf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 5 deletions

View File

@ -84,12 +84,16 @@ export default Ember.Controller.extend(PeriodComputationMixin, {
@computed("model.attributes.updated_at")
updatedTimestamp(updatedAt) {
return moment(updatedAt).format("LLL");
return moment(updatedAt)
.tz(moment.tz.guess())
.format("LLL");
},
@computed("lastBackupTakenAt")
backupTimestamp(lastBackupTakenAt) {
return moment(lastBackupTakenAt).format("LLL");
return moment(lastBackupTakenAt)
.tz(moment.tz.guess())
.format("LLL");
},
_reportsForPeriodURL(period) {

View File

@ -138,8 +138,8 @@
<h4>{{i18n "admin.dashboard.last_updated"}} </h4>
<p>{{updatedTimestamp}}</p>
<a rel="noopener" target="_blank" href="https://meta.discourse.org/tags/release-notes" class="btn">
{{i18n "admin.dashboard.whats_new_in_discourse"}}
</a>
{{i18n "admin.dashboard.whats_new_in_discourse"}}
</a>
</div>
</div>
</div>

View File

@ -27,7 +27,7 @@ class Admin::DashboardNextController < Admin::AdminController
private
def last_backup_taken_at
if last_backup = Backup.all.last
if last_backup = Backup.all.first
File.ctime(last_backup.path).utc
end
end