Skip to content

Coercing time points to Date and POSIXct should floor, not cast #205

@DavisVaughan

Description

@DavisVaughan
library(clock)

# review other usage of time_point_cast()

# should floor to day
as.Date(naive_time_parse("1969-01-01 01:01:01"))
#> [1] "1969-01-02"

# should floor to second
as.POSIXct(naive_time_parse("1969-01-01 01:01:01.123", precision = "millisecond"))
#> [1] "1969-01-01 01:01:02 EST"

Created on 2021-04-07 by the reprex package (v1.0.0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions