stelcodes/nuzzle

Allow time values like `:nuzzle/updated` to be date, datetime, or zoned datetime

Closed this issue · 0 comments

Right now Nuzzle only supports date values for the :nuzzle/updated page entry key. This is actually very limiting because date values are imprecise and are impossible to resolve to a specific instant without a time and time zone. This value, along with any other future time values, should be allowed to be a date 2022-08-16, a datetime 2022-08-16T12:12:12 or a zoned datetime 2022-08-16T12:12:12Z. All of these values should be converted into a java.time.Instant and that should be made apparent in docs.

Also, it should be noted in the docs that zoned datetimes are the best to use because they won't change when your system changes time zones. If you build your site on the east coast and then fly over to the west coast, change your time settings, and build the site again, your previous entries will have different updated times! So using zoned datetimes is by far the best, but you can use dates or datetimes if you don't care about this at all.