0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00
ghost/core/server/models/base
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
..
index.js 🎨 fix previos/current date comparison (isEqual in bookshelf) (#8357) 2017-04-19 10:59:09 +02:00
listeners.js 🐛 UTC offset for scheduled posts when changing timezone (#8356) 2017-04-19 10:26:33 +02:00
token.js 🐛 🎨 old accesstokens are not cleaned up (#8065) 2017-03-01 10:12:03 +00:00
utils.js replace auto increment id's by object id (#7495) 2016-11-17 09:09:11 +00:00