lindylearn / aboutideasnow

Find people to talk to or collaborate with by searching across the /about, /ideas and /now pages of 1000s of personal websites.
https://aboutideasnow.com
MIT License
192 stars 6 forks source link

Wrong "last updated" displayed after indexing site #8

Closed spencewenski closed 6 months ago

spencewenski commented 6 months ago

I indexed my site which I just added about/ideas/now pages to. I included the last update time with the string Last updated: 27 Feb 2024. However, when I indexed my site, it said the last update time was 26 Feb 2024.

Site: https://spencewenski.com Technology: NextJS + MUI Browser: Firefox OS: MacOS (apple silicon) Time index request submitted: ~4:45 pm US Pacific time on 27 Feb 2024

Screenshot 2024-02-27 at 4 56 17 PM Screenshot 2024-02-27 at 4 56 32 PM
phgn0 commented 6 months ago

This seems like a timezone issue. Your posts actually are saved with 2024-02-27T00:00:00.000Z in the database. 👀

phgn0 commented 6 months ago

Okay yes, the client Intl.DateTimeFormat() was converting the date to Pacific Time which changed the date. I just fixed this with https://github.com/lindylearn/aboutideasnow/commit/a3f092fbe9a9a06336870a9b1834d85704603dd7.

Thank you for reporting this!!