xenocrat / chyrp-lite

An ultra-lightweight blogging engine, written in PHP.
https://chyrplite.net/
BSD 3-Clause "New" or "Revised" License
417 stars 44 forks source link

Refreshing timestamp when posting draft #206

Closed xdpirate closed 1 year ago

xdpirate commented 1 year ago

Hey - fantastic lightweight blogging engine, been using it for nearly a year at this point, thank you.

When posting a draft, the timestamp on the post stays the same as on the draft, and will be posted under the wrong date (and URL as a result). Is it possible to get a button next to the timestamp box that says "Use current time", which updates the timestamp to the current time? This could easily be implemented in JS:

document.getElementById("input#created_at").value = new Date().toISOString()
xenocrat commented 1 year ago

Hello there,

Thank you for the kind words and for the suggestion. I think it probably makes sense to always update the timestamp when editing a draft - I'll look into it.