Skip to content

Commit

Permalink
FIX: fixes last backup/last_update dates (#6242)
Browse files Browse the repository at this point in the history
  • Loading branch information
jjaffeux committed Aug 7, 2018
1 parent 56d3e07 commit 67ec81b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
Expand Up @@ -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) {
Expand Down
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/admin/dashboard_next_controller.rb
Expand Up @@ -27,7 +27,7 @@ def general
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
Expand Down

1 comment on commit 67ec81b

@discoursebot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/help-us-build-the-new-dashboard/86468/271

Please sign in to comment.