The format you use to insert into a DB (e.g. in fixtures) is different to what DBs return
The formats you can use to do a comparison like > or < is not consistent between SQLite and MySQL
The formats we return from the DB, and from our API endpoints can all be different
JSON comparisons seem to work in some cases and not others, but really we should be using ISODate
The mai use cases for dates are:
get helpers, where the real use case looks like this:
{{#get "posts" filter="published_at:<='{{published_at}}'+id:-{{id}}" limit="3"}}
this means it depends what comes out of the API as to what goes back in...
ref: https://ghost.org/docs/themes/helpers/get/#filter
NQL date handling is in an unmanageable state.
We have to manage across the following variables:
{{#get "posts" filter="published_at:<='{{published_at}}'+id:-{{id}}" limit="3"}}
this means it depends what comes out of the API as to what goes back in... ref: https://ghost.org/docs/themes/helpers/get/#filterlast_seen_at>now-1d
ref: https://github.com/TryGhost/NQL/issues/26We need to make sure that dates work consistently in these 3 cases.