From: Zachary Vance Date: Fri, 8 Nov 2024 04:20:29 +0000 (-0500) Subject: Order within a day X-Git-Url: https://git.za3k.com/?a=commitdiff_plain;h=60a3a80cc57368dd3c3b3ed9671ebcabf70a2b6b;p=blog.git Order within a day --- diff --git a/blog b/blog index 33e4e2b..9125499 100755 --- a/blog +++ b/blog @@ -181,7 +181,12 @@ class Post(Templatable): k = "_" + k if isinstance(v, datetime.date): tz = zoneinfo.ZoneInfo(blog.timezone) - time = datetime.time(18,0,0) + + if hasattr(v, "time"): + time = v.time() + else: + time = datetime.time(18,0,0) + print(parsed["title"], v, time) v = datetime.datetime.combine(v, time, tz) self[k] = v self.post_title = self.title # Avoids a dumb thing with str.title in a template diff --git a/posts/home-automation.md b/posts/home-automation.md index 32f8333..3b641d3 100644 --- a/posts/home-automation.md +++ b/posts/home-automation.md @@ -2,7 +2,7 @@ author: admin categories: - Technical -date: 2024-11-07 +date: 2024-11-07 18:00:00 tags: - data logging - home automation diff --git a/posts/lembas.md b/posts/lembas.md index 19c1fc1..85f9c6e 100644 --- a/posts/lembas.md +++ b/posts/lembas.md @@ -2,7 +2,7 @@ author: admin categories: - Non-Technical -date: 2024-11-04 +date: 2024-11-04 18:01:00 tags: - hack-a-day - cooking diff --git a/posts/mealsquares.md b/posts/mealsquares.md index 908ba1c..268ba3a 100644 --- a/posts/mealsquares.md +++ b/posts/mealsquares.md @@ -2,7 +2,7 @@ author: admin categories: - Non-Technical -date: 2024-11-07 +date: 2024-11-04 18:00:00 tags: - cooking title: 'Meal Squares 1.0 Recipe' diff --git a/posts/sunchart.md b/posts/sunchart.md index 046d816..290363c 100644 --- a/posts/sunchart.md +++ b/posts/sunchart.md @@ -2,7 +2,7 @@ author: admin categories: - Technical -date: 2024-11-07 +date: 2024-11-07 18:01:00 tags: - hack-a-day title: 'Hack-a-Day, Day 07: When Does the Sun Come Back?'