Skip to content

Incorrect relative time - hour/minutes/seconds are truncated #154

Open
@YangchenYe323

Description

@YangchenYe323

The below code is causing now and other relative time to be parsed relative to "start of the day" instead of "now". Is this a bug or there's special reason for the behavior?

fn at_date_inner(date: Vec<Item>, mut d: DateTime<FixedOffset>) -> Option<DateTime<FixedOffset>> {
d = d.with_hour(0).unwrap();
d = d.with_minute(0).unwrap();
d = d.with_second(0).unwrap();
d = d.with_nanosecond(0).unwrap();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions