Log in Sign up Cart (0)

Welcome to the Devnull Epoch

Posted by Kevin McCall on

The Devnull epoch started at 1,615,855,320 seconds after midnight on January 1, 1970 (GMT). This may seem like an absurdly arbitrary way to record the occurrence of a significant event, but storing date and time information as a UNIX timestamp has quite a few advantages:

  1. You can handle the date and time information programmatically as an integer,
  2. There are many tools and libraries available for converting UNIX time to whatever format you find most useful, and
  3. There was never a Y2K issue with UNIX timestamps.

Of course, you can't effectively record dates and times before the start of the UNIX epoch, but that's generally never an issue on a server, is it?

So how did we land on this specific number? Using a bash script, of course!

Here's how our script works:

Prior to launching, visitors to the devnull.com homepage were being redirected to a coming soon/login page. So any request for https://devnull.com/ would result in a 302 redirect to /password but when the site goes live, a request to the homepage gets a 200 response code. It's easy enough to check for the return code using curl | grep | awk (or cut):

$ curl -I https://devnull.com | grep "^HTTP" | awk '{print $2}'

It's also really simple to get the current UNIX timestamp:

$ date "+%s"

Putting these together in a command line script using a while loop, we have the following:

You can own a piece of Devnull history with our Devnull Epoch T-shirts for both men and women.


Leave a comment

Please note, comments must be approved before they are published



Join our email list and get a 20% off promo code