From d3be69903e31306dcff8b2197c2f2070fb1e0229 Mon Sep 17 00:00:00 2001 From: Myrddin Dundragon Date: Mon, 8 Sep 2025 21:23:09 -0400 Subject: [PATCH] Used the wrong sign on the date check. --- tavern/Cargo.toml | 2 +- tavern/src/database.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tavern/Cargo.toml b/tavern/Cargo.toml index 8fb41e5..57ec38c 100644 --- a/tavern/Cargo.toml +++ b/tavern/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tavern" -version = "0.2.8" +version = "0.2.9" edition = "2024" description = "A blogging system that will allow you to write your blog in Markdown and then display it in HTML using Dioxus." repository = "/CyberMages/tavern" diff --git a/tavern/src/database.rs b/tavern/src/database.rs index aad1079..4216e8d 100644 --- a/tavern/src/database.rs +++ b/tavern/src/database.rs @@ -345,7 +345,7 @@ impl Database .map_err(|e| sqlx::Error::Decode(e.into()))?; // Only give tales that are ready to be published. - if current_time <= publish_date + if current_time >= publish_date { let tags_str: Option = row.try_get("tags")?; let tags = tags_str.map(|s| s.split(',').map(String::from).collect()) @@ -395,7 +395,7 @@ impl Database let publish_date = chrono::NaiveDateTime::parse_from_str(&date_str, "%Y-%m-%d %H:%M:%S") .map_err(|e| Error::Decode(e.into()))?; - if current_time > publish_date + if current_time < publish_date { return Ok(None); }