🏠
Author: burntsushi.net (did:plc:f76pq3i4ingij56xtde5tyzg)

Collections

Record🤔

uri:
"at://did:plc:f76pq3i4ingij56xtde5tyzg/app.bsky.feed.post/3kpvlm2mfsy2y"
cid:
"bafyreia4lk4i6u36phu6ybwyo2ub6brps3nifukuwvbsxmdp6jfgrtp6km"
value:
text:
"I've got leap second support working in Jiff. Both for roundtripping through datetimes and for computing correct intervals.

Does anyone know of other datetime libraries that would pass the same asserts?

N.B. `Instant` is a 96-bit timestamp. TAI is "International Atomic Time.""
$type:
"app.bsky.feed.post"
embed:
$type:
"app.bsky.embed.images"
images:
  • alt:
    "Shows a snippet of code that subtracts two instants in time that cross a time scale. It demonstrates subtraction with two different time scales: Unix and TAI. The former yields an incorrect difference (1 second) while the latter returns the expected result (2 seconds)."
    image:
    View blob content
    $type:
    "blob"
    mimeType:
    "image/jpeg"
    size:
    823037
    aspectRatio:
    width:
    1042
    height:
    732
  • alt:
    "A screenshot of code that demonstrates leap second preservation when converting from a civil datetime to a timestamp and back. When using the Unix time scale, the leap second information is lost. But when using the TAI time scale, the leap second is preserved!"
    image:
    View blob content
    $type:
    "blob"
    mimeType:
    "image/jpeg"
    size:
    697809
    aspectRatio:
    width:
    987
    height:
    753
langs:
  • "en"
createdAt:
"2024-04-12T01:42:55.477Z"