Calculating Internet Swatch Time

Prologue

So on Agora Road one day we had a thread on Swatch Internet time. Swatch Internet time or .beat time is a decimal time system invented by the Swatch watch corporation as a marketing device for their new swatch watch line. Swatch internet time works by dividing the day into 1000 blocks of 86.4 seconds referred to as ".beats". The date of the day is determined at Biel, Switzerland or at UTC+1. The main advantage of Internet Swatch is the complete lack of time-zones. @444 .beats is the same at Tokyo as it is in Murmansk. Of course that means that @444 could mean noon, morning, evening or even night.

Calculating Swatch internet time

Swatch Internet Time can be computed via the usage of the following formula:
(3600h + 60m + s) / 86.4
Of course if you are given access to UNIX time (thanks to Volunkaaz for bringing this method up) it's much more efficient to:

  1. Get the Unix timestamp
  2. Add 3600 (for a hour)
  3. Modulo by 86400
  4. And then divide by 86.4

Exempli grata here is an elisp function that calculates Internet Swatch Time:

(defun beat (&optional h m s) "Tell .beat time. Pass H for hour, M for minute and S for second. If H/M is defined but the rest isn't it will error. Otherwise tells current time. Seek `'https://wikiless.tiekoetter.com/wiki/Swatch_Internet_Time' for further information." (interactive) (cond ((not h) (message (format "@%f" (/ (% (+ (time-convert (current-time) 'integer) 3600) 86400) 86.4)))) ((or (< h 0) (> h 24) (> m 60) (< m 0) (< s 0) (> s 60)) (error "Invalid HMS")) ((message (format "@%f" (/ (- (+ (* h 3600) (* m 60) s 3600) (car (current-time-zone))) 86.4))))))

The following function utilises both the formula method and the UNIX time method. It also handles potential errors such as invalid HMS.

Epilogue

Internet Swatch is a relic from the dotcom bubble when every company and their mother ventured into the world wide web.