215
DateTime (xkcd.com)
submitted 9 months ago by yogthos@lemmy.ml to c/programmerhumor@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments
[-] sebsch@discuss.tchncs.de 5 points 9 months ago

I mean, as long you only need the delta in milliseconds it's easy. Just count the milliseconds from 1970 to the event. The problem starts when you want to have a human readable representation.

It's calenders they suck, not time.

[-] mormegil@programming.dev 6 points 9 months ago

Well... unless you measure the number of [milli]seconds using something like time_t, which lies because of leap seconds. I.e. even such a seemingly simple interface, in fact, includes a calendar.

this post was submitted on 14 Dec 2023
215 points (95.7% liked)

Programmer Humor

32162 readers
363 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS