0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00
ghost/core
Katharina Irrgang f2fd075075 🎨 fix previos/current date comparison (isEqual in bookshelf) (#8357)
no issue

- client dates are sent as ISO format (moment(..).format())
- server dates are in JS Date format
  >> when bookshelf fetches data from the database, all dates are transformed into JS dates
  >> see `parse` helper function
- Bookshelf updates the model with the client data via Bookshelf's `set` function
- therefor Bookshelf uses a simple `isEqual` function from lodash to detect changes
- .previous(attr) and .get(attr) return false
- that has the concequence that dates are always marked as "changed"
- internally we use our `hasDateChanged` if we have to compare previous/updated dates
- but Bookshelf is not in our control for this case
2017-04-19 10:59:09 +02:00
..
client@aa6a3d2416 Updated Ghost-Admin to 1.0.0-alpha.19 2017-04-11 18:20:49 +01:00
server 🎨 fix previos/current date comparison (isEqual in bookshelf) (#8357) 2017-04-19 10:59:09 +02:00
test 🐛 UTC offset for scheduled posts when changing timezone (#8356) 2017-04-19 10:26:33 +02:00
index.js