Used the wrong sign on the date check.
This commit is contained in:
@ -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"
|
||||
|
||||
@ -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<String> = 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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user