PlaidWeb / Publ

Flexible publishing system for the web
http://publ.beesbuzz.biz/
MIT License
40 stars 4 forks source link

Switch to UTC timestamp and add date-based filtering to search #461

Closed fluffy-critter closed 3 years ago

fluffy-critter commented 3 years ago

Summary

Changes the internal storage of entry date filters, and adds future-entry filtering to search. Fixes #453

Detailed description

While implementing #454 I came across an annoying bug where entry data couldn't be updated due to https://github.com/ponyorm/pony/issues/434. Since UTC date is only used for sorting and comparison I changed the data schema for that to be a simple UNIX timestamp. While updating the code for that, I was reminded of this bug, and noticed that the search index could be trivially updated to include publish status and have a future parameter on search queries. So I went ahead and implemented this fix, since it was easy enough.

Developer/user impact

Test plan

Search for the word '2038' with future search on or off.

Got a site to show off?