docs: add some comments about future potential changes
Signed-off-by: Christina Sørensen <ces@fem.gg>
This commit is contained in:
parent
3cc47178eb
commit
d59ad592bd
2 changed files with 2 additions and 0 deletions
|
@ -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>,
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue