Live data from Hacker News

The Unix timestamp will begin with 16 this Sunday

unixtimestamp.com

161–170 of 214 posts

Re: The Unix timestamp will begin with 16 this Sunday

#161

Earlier quoted context omitted.

Making time an unsigned 32 would break any code that computes a difference of times.

Not really. Addition and subtraction don't care about unsigned vs signed status, because overflow is identitcal in both cases. Think of an odometer for a car with 999999 as its max number. 999,999 is equivalent to -1. So 500 + 999999 == 499 on the odometer. A 32-bit register is simply a binary odometer, so the above concept happens with bits. In "signed int", we print the number "999999" as "-1". With "unsigned int",…

> Addition and subtraction don't care about unsigned vs signed status, because overflow is identitcal in both cases.

Except signed overflow invoking Undefined Behaviour in any C compiler, whereas unsigned overflow does not.

This invokes undefined behaviour:

    foo(int x) {
      return x + 1 > x;
    }

Re: The Unix timestamp will begin with 16 this Sunday

#162
post #59

I remember staying up late (UK) at the Billenium (2:46 AM Sunday Sep 9th 2001), thinking that was bound to be the most newsworthy event of the week, watching the seconds tick past on a "while(sleep 1); do date" loop, with slashdot in one window, IRC in another, all running on an enlightenment window manager. 500M seconds later I was in Washington DC in a hotel, watching it tick up on an rxvt on my laptop, with HN in…

I remember holding a similar billionth second party in Soda Hall (Wozniak Lounge) at Berkeley as an undergrad. Never realized how close that was before 9/11.

Re: The Unix timestamp will begin with 16 this Sunday

#163
post #114

Earlier quoted context omitted.

> a "while(sleep 1); do date" loop, There's always "xclock -d -update 1 -strftime %s -face Inconsolata-190:bold "

Why not just `watch date` ?

watch updates every 2 seconds by default.

`watch -n1 date` will update every second.

Re: The Unix timestamp will begin with 16 this Sunday

#164
post #21

It is going to be at 2020-09-13 12:26:40 UTC. Python: $ python3 -q >>> from datetime import datetime >>> datetime.utcfromtimestamp(1_600_000_000) datetime.datetime(2020, 9, 13, 12, 26, 40) GNU date (Linux): $ date -ud @1600000000 Sun Sep 13 12:26:40 UTC 2020 BSD date (macOS, FreeBSD, OpenBSD, etc.): $ date -ur 1600000000 Sun Sep 13 12:26:40 UTC 2020 All such dates (in UTC) until the end of the current century: $ pyth…

Omit the "u" to see the result in local time, not UTC.

Thank you both. I was looking for the right combination of flags and realized that the date(1) man page is far too dense for simple tasks like this.

  $ date -r 1600000000
  Sun Sep 13 05:26:40 PDT 2020

Re: The Unix timestamp will begin with 16 this Sunday

#165
post #114
post #59

I remember staying up late (UK) at the Billenium (2:46 AM Sunday Sep 9th 2001), thinking that was bound to be the most newsworthy event of the week, watching the seconds tick past on a "while(sleep 1); do date" loop, with slashdot in one window, IRC in another, all running on an enlightenment window manager. 500M seconds later I was in Washington DC in a hotel, watching it tick up on an rxvt on my laptop, with HN in…

> a "while(sleep 1); do date" loop, There's always "xclock -d -update 1 -strftime %s -face Inconsolata-190:bold "

> I remember staying up late (UK) at the Billenium (2:46 AM Sunday Sep 9th 2001)

Inconsolata wasn't released until 2006.

https://en.wikipedia.org/wiki/Inconsolata

Re: The Unix timestamp will begin with 16 this Sunday

#166
post #89

Earlier quoted context omitted.

Yes, but the point is that the UNIX timestamp doesn't count the the number of seconds elapsed since January 1, 1970. It counts 86400 seconds per day, regardless of how many seconds the day actually has (which can vary due to leap seconds).

IIUC unix timestamp simply counts seconds (well defined interval of time) from epoch onwards. It is then up to different calendars to interpret this number as a given day / hour /... This is the beauty of it - it is always an accurate (well, at low speeds at least ;) ) measure of time. In other words, no, some days might not last 86400 seconds.

This is not correct. UNIX timestamps always have 86400 seconds per day, and consequently, they do not actually count the number of seconds since the epoch.

Re: The Unix timestamp will begin with 16 this Sunday

#168
post #143

Earlier quoted context omitted.

I quite enjoyed Rainbow's End as well.

There's an extra apostrophe there... this is addressed toward the end of the novel.

Yes, it's not "The end of this particular rainbow", it's "rainbows have an end". It bugged me until I got to that part of the book.

Re: The Unix timestamp will begin with 16 this Sunday

#169

The crazy thing is there has only been 1.6 billion seconds since 1970. There have been more babies since 1970 than there have been seconds. Which is crazy. Back then, Earth's population was on 3.7 billion. Now it's 7.8 billion. That means that (ignoring deaths) 2.5 babies have been born for each unix second. Or roughly 1 baby every 400 milliseconds.

IIRC, it's ~5.5 births and 3 deaths per second (worldwide). Also, see: https://www.worldometers.info/

That sounds about right. Approx 50 million deaths per year in that frame. 50 years....2.5 billion deaths. So 2.5+1.5 births and 1.5 deaths a second. If you round up deaths to whole numbers, 3 deaths per 2 seconds, maybe that's the error, adding the 3 deaths per 2 seconds to 2.5 deaths per 1 second. Or 8 births and 3 deaths every 2 seconds. Or 1 death every 700ms.

Re: The Unix timestamp will begin with 16 this Sunday

#170
post #51
post #28

Earlier quoted context omitted.

I don't think that's too crazy. Seconds are serial, babies are parallel :)

Yet while one woman can generate 1 baby in 9 months, 9 women can't do it in 1 month

Underrated comment. Reply anticipation: this is not reddit. Preemptive response, I know, doesn't change the fact that this comment is underrated :);p xx

Only thing I want to add: not yet, maybe with CRISPR and artificial wombs there could be some way.

Post reply on HN