Ghost/ghost/admin/app/services/time-zone.js
Kevin Ansfield 7c2e923074 Rename "offset" to "blogTimezone"
refs https://github.com/TryGhost/Ghost/pull/6941#issuecomment-224553575
- `blogTimezone` and `timezone` better reflect their values (a string representing a timezone in the format `Europe/Dublin`) than `offset` which suggests a fixed value
2016-06-08 12:09:19 +01:00

29 lines
647 B
JavaScript

import Ember from 'ember';
const {
Service,
computed,
inject: {service}
} = Ember;
export default Service.extend({
store: service(),
_parseTimezones(settings) {
let activeTimezone = settings.get('activeTimezone');
return activeTimezone;
},
_settings: computed(function () {
let store = this.get('store');
return store.queryRecord('setting', {type: 'blog,theme,private'});
}),
blogTimezone: computed('_settings.activeTimezone', function () {
return this.get('_settings').then((settings) => {
return this._parseTimezones(settings);
});
})
});