Ghost/ghost/admin
Aileen Nowak 24e71ffdaa Timezones: Always use the timezone of blog setting
closes TryGhost/Ghost#6406

follow-up PR of #2

- adds a `timeZone` Service to provide the offset (=timezone reg. moment-timezone) of the users blog settings
- `gh-datetime-input` will read the offset of the timezone now and adjust the `publishedAt` date with it. This is the date which will be shown in the PSM 'Publish Date' field. When the user writes a new date/time, the offset is considered and will be deducted again before saving it to the model. This way, we always work with a UTC publish date except for this input field.
- gets `availableTimezones` from `configuration/timezones` API endpoint
- adds a `moment-utc` transform on all date attr (`createdAt`, `updatedAt`, `publishedAt`, `unsubscribedAt` and `lastLogin`) to only work with UTC times on serverside
- when switching the timezone in the select box, the user will be shown the local time of the selected timezone
- `createdAt`-property in `gh-user-invited` returns now `moment(createdAt).fromNow()` as `createdAt` is a moment date already
- added clock service to show actual time ticking below select box
- default timezone is '(GMT) Greenwich Mean Time : Dublin, Edinburgh, London'
- if no timezone is saved in the settings yet, the default value will be used
- shows the local time in 'Publish Date'  in PSM by default, until user overwrites it
- adds dependency `moment-timezone 0.5.4` to `bower.json`

---------

**Tests:**

- sets except for clock service in test env
- adds fixtures to mirage
- adds `service.ajax` and `service:ghostPaths` to navigation-test.js
- adds unit test for `gh-format-timeago` helper
- updates acceptance test `general-setting`
- adds acceptance test for `editor`
- adds integration tests for `services/config` and `services/time-zone`

---------

**Todos:**

- [ ] Integration tests: ~~`services/config`~~, ~~`services/time-zone`~~, `components/gh-datetime-input`
- [x] Acceptance test: `editor`
- [ ] Unit tests: `utils/date-formatting`
- [ ] write issue for renaming date properties (e. g. `createdAt` to `createdAtUTC`) and translate those for server side with serializers
2016-06-03 16:23:39 +02:00
..
.github Rename PULL_REQUEST_TEMPLATE to PULL_REQUEST_TEMPLATE.md 2016-05-23 10:50:15 +01:00
app Timezones: Always use the timezone of blog setting 2016-06-03 16:23:39 +02:00
config Minor version header fixes 2016-06-03 14:47:47 +01:00
lib
public/assets
tests Timezones: Always use the timezone of blog setting 2016-06-03 16:23:39 +02:00
.editorconfig Match .gitignore and .editorconfig with Ghost repo 2016-05-19 11:39:15 +01:00
.ember-cli
.gitignore Match .gitignore and .editorconfig with Ghost repo 2016-05-19 11:39:15 +01:00
.jscsrc
.jshintrc Add Gruntfile.js, setup linting task and Travis build 2016-06-02 17:19:30 +01:00
.travis.yml Add Gruntfile.js, setup linting task and Travis build 2016-06-02 17:19:30 +01:00
.watchmanconfig
bower.json Timezones: Always use the timezone of blog setting 2016-06-03 16:23:39 +02:00
ember-cli-build.js Timezones: Always use the timezone of blog setting 2016-06-03 16:23:39 +02:00
Gruntfile.js Add Gruntfile.js, setup linting task and Travis build 2016-06-02 17:19:30 +01:00
package.json Add version header to API requests 2016-06-03 11:53:29 +01:00
README.md Initial sub-project README.md 2016-05-19 11:39:15 +01:00
testem.js

Ghost-Admin

This is the home of Ember.js based admin client that ships with Ghost. For now, refer to that repository for install and development instructions.

Have a bug or issue?

Bugs and issues (even if they only affect the admin client) should be opened on the core Ghost repository.