fix: increases specificity of dates so entries are still correctly ordered within the same day
This commit is contained in:
parent
e7cf98ae17
commit
73823e84ec
4 changed files with 6 additions and 5 deletions
|
|
@ -85,7 +85,7 @@ fn render_entry(entry: &Entry, config: &Config) -> String {
|
|||
};
|
||||
let mut header = format!(
|
||||
"<span class=\"entry-header\">{} - <span class=\"entry-name\">{}</span>",
|
||||
entry.meta.date, name
|
||||
&entry.meta.date[..10], name
|
||||
);
|
||||
if config.enable_website_links && !entry.meta.website.is_empty() {
|
||||
let website = escape_html(&entry.meta.website);
|
||||
|
|
|
|||
|
|
@ -117,8 +117,9 @@ async fn submit(
|
|||
}
|
||||
|
||||
let short_id = &Uuid::new_v4().to_string()[..8];
|
||||
let date = chrono::Utc::now().format("%Y-%m-%d").to_string();
|
||||
let filename = format!("{date}-{short_id}.txt");
|
||||
let date = chrono::Utc::now().format("%Y-%m-%dT%H:%M:%S").to_string();
|
||||
let date_short = &date[..10];
|
||||
let filename = format!("{date_short}-{short_id}.txt");
|
||||
|
||||
let entry = Entry {
|
||||
id: filename.trim_end_matches(".txt").to_string(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue