Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
swatch_time [2023/06/12 01:18] – [Swatch Internet Time / .beat Time] melon | swatch_time [2023/12/04 13:47] (current) – melon | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Swatch Internet Time / .beat Time ====== | ====== Swatch Internet Time / .beat Time ====== | ||
- | <fs xx-large> | + | <fs xx-large> |
Swatch time is a universal standard time for the entire internet! It lets you plan events or meetups with your friends from anywhere in the world and not have to worry about timezones or other annoyances! Its also hella hacker and very cool to use :^) | Swatch time is a universal standard time for the entire internet! It lets you plan events or meetups with your friends from anywhere in the world and not have to worry about timezones or other annoyances! Its also hella hacker and very cool to use :^) | ||
- | It was originally invented by the Swatch Company in 1998 although it did not gain much widespread popularity - however it's used on MelonLand and many other web revival sites as a standard means of organisation and planning! | + | It was originally invented by the Swatch Company in 1998 (Sorta since they copied it from a time format used in the French Revolution) |
===== How does it work? ===== | ===== How does it work? ===== | ||
- | It divides the day into 1000 “**beats**”. Instead of using hours, minutes, and seconds to represent time, Swatch Internet Time uses a single decimal number ranging from 000 to 999. Each beat is equivalent to 1 minute and 26.4 seconds. Sometimes you'll also see some extra numbers like " | + | It divides the day into 1000 “**beats**”. Instead of using hours, minutes, and seconds to represent time, Swatch Internet Time uses a single decimal number ranging from 000 to 999. Each beat is equivalent to 1 minute and 26.4 seconds. Sometimes you'll also see some extra numbers like " |
- | Swatch time is usually preceded by an **@** symbol; this helps you know its swatch time and not some random number! For example **@123** or **@542.69** | + | Swatch time is usually preceded by an **@** symbol; this helps you know it' |
000 in Swatch time is the same as Midnight UTC+1; but because swatch time does not use timezones, midnight will be different for everyone. The goal of swatch time is not to provide the relative time you can use in your daily life; it's for worldwide events that all need to happen at the same time! | 000 in Swatch time is the same as Midnight UTC+1; but because swatch time does not use timezones, midnight will be different for everyone. The goal of swatch time is not to provide the relative time you can use in your daily life; it's for worldwide events that all need to happen at the same time! | ||
+ | |||
+ | ==== Useful Conversions ==== | ||
+ | Below are some helpful conversions you can use to contextualise beat time and understand how to think about it! | ||
+ | |||
+ | === Recommended reference beat times: === | ||
+ | |||
+ | * **1.beat** - AFK I'll be back in a moment! | ||
+ | * **5.beats** - The time it takes to make a coffee | ||
+ | * **15.beats** - a quick lunch break | ||
+ | * **30.beats** - An average TV show episode without ads | ||
+ | * **100.beats** - A long movie! | ||
+ | * **200.beats** - The whole afternoon! | ||
+ | * **350.beats** - The time you'd spend at a full-time job and/or a good night' | ||
+ | |||
+ | === Beats to common time frames: === | ||
+ | |||
+ | * **4.beats** = 5 minutes | ||
+ | * **11.beats** = 15 minutes | ||
+ | * **42.beats** = 1 hour | ||
+ | * **126.beats** = 3 hours | ||
+ | * **1000.beats** = 24 hours | ||
===== How can I use swatch time in my life? ===== | ===== How can I use swatch time in my life? ===== | ||
Line 31: | Line 52: | ||
* The Swatch [[https:// | * The Swatch [[https:// | ||
* Swatch Time History on [[https:// | * Swatch Time History on [[https:// | ||
+ | * Decimal Time on Wikipedia [[https:// | ||
---- | ---- | ||
Line 43: | Line 65: | ||
Here is a premade JavaScript clock for your website! Just paste this code onto your page wherever you want your clock to be and it will work! | Here is a premade JavaScript clock for your website! Just paste this code onto your page wherever you want your clock to be and it will work! | ||
< | < | ||
- | <span id=" | + | <span id=" |
+ | <script defer src=" | ||
+ | </ | ||
+ | |||
+ | **JavaScript - Full Code** | ||
+ | < | ||
+ | // Returns the current Swatch beat | ||
+ | function GetSwatchTime(showDecimals = true) { | ||
+ | // get date in UTC/GMT | ||
+ | var date = new Date(); | ||
+ | var hours = date.getUTCHours(); | ||
+ | var minutes = date.getUTCMinutes(); | ||
+ | var seconds = date.getUTCSeconds(); | ||
+ | var milliseconds = date.getUTCMilliseconds(); | ||
+ | // add hour to get time in Switzerland | ||
+ | hours = hours == 23 ? 0 : hours + 1; | ||
+ | // time in seconds | ||
+ | var timeInMilliseconds = ((hours * 60 + minutes) * 60 + seconds) * 1000 + milliseconds; | ||
+ | // there are 86.4 seconds in a beat | ||
+ | var millisecondsInABeat = 86400; | ||
+ | // calculate beats to two decimal places | ||
+ | if (showDecimals) { | ||
+ | return Math.abs(timeInMilliseconds / millisecondsInABeat).toFixed(2); | ||
+ | } else { | ||
+ | return Math.floor(Math.abs(timeInMilliseconds / millisecondsInABeat)); | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | If you want it to display on your webpage and auto-update here is an example - first, we make a **span** with an id, this is where the clock will appear on your page - then we get that span in a script, make a function that fills it with the swatch time, and finally, we set it to reload every microbeat. | ||
+ | < | ||
+ | <span id=" | ||
+ | < | ||
+ | var mySwatchClock = document.getElementById(' | ||
+ | function updateSwatchClock() { | ||
+ | mySwatchClock.innerHTML = ' | ||
+ | } | ||
+ | setInterval(updateSwatchClock(), | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ==== PHP: ==== | ||
+ | |||
+ | PHP has native support for Swatch time, you can get the latest beat using this snippet: | ||
+ | < | ||
+ | |||
+ | However if you would like a full function that also shows microbeats, we have that too! | ||
+ | < | ||
+ | // Returns the current Swatch beat | ||
+ | function GetSwatchTime($showDecimals = true) | ||
+ | { | ||
+ | // Get time in UTC+1 (Do not Change!) | ||
+ | $now = new DateTime(" | ||
+ | $now-> | ||
+ | // Calculate the seconds since midnight e.g. time of day in seconds | ||
+ | $midnight = clone $now; | ||
+ | $midnight-> | ||
+ | $seconds = $now-> | ||
+ | // Swatch beats in seconds - DO NOT CHANGE | ||
+ | $swatchBeatInSeconds = 86.4; | ||
+ | // Calculate beats to two decimal places | ||
+ | if ($showDecimals) { | ||
+ | return number_format(round(abs($seconds / $swatchBeatInSeconds), | ||
+ | } else { | ||
+ | return floor(abs($seconds / $swatchBeatInSeconds)); | ||
+ | } | ||
+ | } | ||
+ | </ |