mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 03:10:46 -06:00
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")
|
||||
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) {
|
||||
|
@ -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>
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user