Skip to content

toSecondResolution needs to handle microseconds #532

Open

Description

@srawlins

The toSecondResolution utility tries to round a DateTime to the nearest whole second by removing milliseconds. However, DateTimes can have microseconds, and as of https://dart.googlesource.com/sdk/+/9f7bf3fcffa32ef89a8c8d4d9d8c4185c1f2324e, will start to have non-zero microseconds when reading file timestamps.

This will come in Dart 3.13. But the fix can be made independently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions