Skip to content

Parsed time object has more than milliseconds #3

@kachick

Description

@kachick

Environment is ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [x86_64-darwin20]

Current master branch of this gem

irb(main):021:0> time = ULID.time '0A000000000000000000000000'
=> 2318-06-04 06:57:57 398459/524288 UTC
irb(main):022:0> time.nsec
=> 760000228

My gem

irb(main):009:0> time = ULID.parse('0A000000000000000000000000').to_time
=> 2318-06-04 06:57:57.76 UTC
irb(main):010:0> time.nsec
=> 760000000

Go library

$ ulid 0A000000000000000000000000
Tue Jun 04 06:57:57.76 UTC 2318

In my understanding, ULID should have milliseconds precision 🤔

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions