Does anyone use/understand/like the old swatch internet time?

I recently was reminded of it and suddenly it seems more sensible and useful than it ever did before. Likely an artifact of my wacky sleep schedule.

en.m.wikipedia.org/wiki/Swatch

The least arbitrary division of the day must be to use the smallest possible divisor, which is binary fractions. 86400 is about the same as 65536, so you get second-ish precision with 16 bits, which can be represented by four hex digits. Time zone is UTC, obviously.

As I started typing this it would soon be 14:30:00 here. That would be ...

$ printf '0x%04x\n' $(((14 * 3600 + 30 * 60) * 65536 / 86400)) 0x9aaa

Easy! You can see that it's afternoon as it's later than 0x8000. 😁

Oops, wrong timezone. UTC that will be 0x4555. You know that's slightly after 06:00 UTC as it's slightly after 0x4000.

This silly idea is slightly more intuitive than I expected.

@RussSharek
Follow

@clacke @RussSharek 65536 is the number of default number of subuids permitted on a Linux system. I feel like I've gained insight into something. I just need to figure out what.

· · Web · 1 · 0 · 1
@klaatu @RussSharek It tells you that original Unix UIDs are a whole number of bytes, 2 bytes, wide. Same with UDP and TCP port numbers. Same with PIDs until a few Linux versions ago.

A geek who dabbles enough with bits and bytes will know by heart that 10 isn't a nice and round number, 1000 isn't a nice and round number, they're just arbitrary numbers, but 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768 and 65536 are all very fine and round numbers, as is e.g. 16777216.
Sign in to participate in the conversation
Mastodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!