main
← cathysarisky:fix-comp-expiration-sqlite
opened 12:52AM - 13 Feb 25 UTC
closes #22176
Development installs with SQLite store dates as epoch milliseco…nds. MySQL stores ISOStrings. The clean-expired-comps job, which is supposed to detect complimentary subscriptions that have expired, was erroneously comparing an ISOString to the SQLite field, which was epoch milliseconds. The result was premature removal of comp subscription that had not yet expired, but only on SQLite sites.
Kudos to Ravn on the Ghost forum for helping to identify the behavior! (Ref: https://forum.ghost.org/t/bulk-creation-of-comped-users-via-admin-api-expiration-issue-after-approx-15-hours/55244/7 )