Skip to content

Negative fractional times round toward zero #116

Closed

Description

@dimensionscape

Date conversion casts the time in seconds with (time_t)inSeconds, which truncates toward zero, so any negative time with milliseconds lands on the wrong second: Date.fromTime(-500) is 1970-01-01 00:00:00 UTC instead of 1969-12-31 23:59:59, and Date.fromTime(-1500).getUTCSeconds() is 59 instead of 58. It should floor.

Activity

  1. added 2 commits that reference this issue on Oct 15, 2026
    c599c77
    9c762fb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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