Skip to content

How to create local date time with zero hour/minute/secondΒ #1022

@DoumanAsh

Description

@DoumanAsh

Due to tons of unecessary deprecations it became impossible to use this library for our use case which is:

  1. Get local date ('chrono::Local::today()`)
  2. Set hour/minute/second to 0:0:0 (and_hms(0, 0, 0))

There is no need to deprecate useful things unless you have alternative for their usage?

chrono::Local::today cannot be replaced with chrono::Local::now as it is.
It returns two completely different things

Something simple as creating midnight timestamp should be error-less, yet you force user unwrapping all these infallible operations because you cannot even provide const constructors

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