docs: add some comments about future potential changes

Signed-off-by: Christina Sørensen <ces@fem.gg>
This commit is contained in:
Christina Sørensen 2024-12-27 09:07:52 +01:00
parent 3cc47178eb
commit d59ad592bd
Signed by: cafkafk
GPG key ID: F67767BE4545A600
2 changed files with 2 additions and 0 deletions

View file

@ -10,6 +10,7 @@ use utils::print_time_delta;
use crate::utils::parse_timestamp;
// TODO: this struct shouldn't be nescesarry
#[derive(Debug)]
struct SharedState {
now: DateTime<Local>,

View file

@ -15,6 +15,7 @@ pub fn naive_time_to_local_datetime(ctx: &SharedState, t: NaiveTime) -> DateTime
pub fn parse_timestamp(ctx: &SharedState, input: &String) -> DateTime<Local> {
let tz = ctx.tz;
// TODO: should be a match case
if let Some(t) = input.parse::<DateTime<Local>>().ok() {
t
} else if let Some(t) = NaiveDateTime::parse_from_str(input, "%Y-%m-%d %H:%M:%S").ok() {