mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-18 05:52:40 +03:00
3002747b68
no issue - we store dates without milliseconds in the database - our test environment does not use our model layer to insert data, this is related to https://github.com/TryGhost/Ghost/issues/7196 - so it can happen that the test env inserts unix timestamps instead of a formatted string - e.g. adding data via the model layer (e.g. via the API) the format is always normalised to `YYYY-MM-DD HH:mm:ss` - if we fetch the date from the database, we have a hook which sorts out knex returning different formats for dates - this hook wraps the returned date into a UTC moment date, but adds the current milliseconds on top - which can collide in tests when you have specific assertions - use `startOf` to ignore milliseconds - furthermore: remove the mentionings of `pg` (postgres) |
||
---|---|---|
.. | ||
index.js | ||
listeners.js | ||
token.js | ||
utils.js |