FIX: fixes last backup/last_update dates (#6242)
This commit is contained in:
parent
56d3e07206
commit
67ec81babf
|
@ -84,12 +84,16 @@ export default Ember.Controller.extend(PeriodComputationMixin, {
|
||||||
|
|
||||||
@computed("model.attributes.updated_at")
|
@computed("model.attributes.updated_at")
|
||||||
updatedTimestamp(updatedAt) {
|
updatedTimestamp(updatedAt) {
|
||||||
return moment(updatedAt).format("LLL");
|
return moment(updatedAt)
|
||||||
|
.tz(moment.tz.guess())
|
||||||
|
.format("LLL");
|
||||||
},
|
},
|
||||||
|
|
||||||
@computed("lastBackupTakenAt")
|
@computed("lastBackupTakenAt")
|
||||||
backupTimestamp(lastBackupTakenAt) {
|
backupTimestamp(lastBackupTakenAt) {
|
||||||
return moment(lastBackupTakenAt).format("LLL");
|
return moment(lastBackupTakenAt)
|
||||||
|
.tz(moment.tz.guess())
|
||||||
|
.format("LLL");
|
||||||
},
|
},
|
||||||
|
|
||||||
_reportsForPeriodURL(period) {
|
_reportsForPeriodURL(period) {
|
||||||
|
|
|
@ -138,8 +138,8 @@
|
||||||
<h4>{{i18n "admin.dashboard.last_updated"}} </h4>
|
<h4>{{i18n "admin.dashboard.last_updated"}} </h4>
|
||||||
<p>{{updatedTimestamp}}</p>
|
<p>{{updatedTimestamp}}</p>
|
||||||
<a rel="noopener" target="_blank" href="https://meta.discourse.org/tags/release-notes" class="btn">
|
<a rel="noopener" target="_blank" href="https://meta.discourse.org/tags/release-notes" class="btn">
|
||||||
{{i18n "admin.dashboard.whats_new_in_discourse"}}
|
{{i18n "admin.dashboard.whats_new_in_discourse"}}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -27,7 +27,7 @@ class Admin::DashboardNextController < Admin::AdminController
|
||||||
private
|
private
|
||||||
|
|
||||||
def last_backup_taken_at
|
def last_backup_taken_at
|
||||||
if last_backup = Backup.all.last
|
if last_backup = Backup.all.first
|
||||||
File.ctime(last_backup.path).utc
|
File.ctime(last_backup.path).utc
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue