From: David Polakovic Date: Fri, 31 Oct 2025 17:41:46 +0000 (+0100) Subject: updated mars clock website and logic X-Git-Url: https://git.dpolakovic.space/?a=commitdiff_plain;h=dacaafd7fc5fe9f980005ce848a8228947337889;p=my-website updated mars clock website and logic --- diff --git a/Styles/styles.css b/Styles/styles.css index c1e1477..f10d9e9 100755 --- a/Styles/styles.css +++ b/Styles/styles.css @@ -15,7 +15,7 @@ @import url('https://fonts.googleapis.com/css2?family=Noto+Serif:wght@450;700&display=swap'); body { - background-color: #e8cba9; + background-color: #E8CBA9; color: #000000; font-family: 'Noto Serif', serif; /* Set font to Noto Serif */ font-size: 18px; @@ -47,53 +47,91 @@ tr:hover { */ nav { - display: flex; + display: flex; } - .nav-bar > ul { - list-style-type: none; - max-width: 1000px; - width: 100%; - margin: 0 auto; - padding: 0; - background-color: #333; - border-radius: 10px; +list-style-type: none; +max-width: 1000px; +width: 100%; +margin: 0 auto; +padding: 0; +background-color: #333333; +border-radius: 10px; } - .nav-bar li { - float: left; +float: left; +position: relative; /* Added for dropdown positioning */ } - .nav-bar li a { - display: block; - color: white; - text-align: center; - padding: 14px 16px; - text-decoration: none; +display: block; +color: white; +text-align: center; +padding: 14px 16px; +text-decoration: none; } - .nav-bar li:last-child { - float: right; - position: relative; +float: right; +position: relative; } - .nav-bar li:last-child a { - border-radius: 0 14px 14px 0; +border-radius: 0 14px 14px 0; } - .gitserver { - background-color: #1e1e1e; +background-color: #1e1e1e; } - .gitstatus { - display: none; - list-style-type: none; - position: absolute; - color: black; +display: none; +list-style-type: none; +position: absolute; +color: black; } - .nav-bar li:last-child:hover .gitstatus { - display: block; +display: block; +} + +/* Dropdown styles */ +.dropdown { +display: block; +color: white; +text-align: center; +padding: 14px 16px; +text-decoration: none; +cursor: pointer; +} + +.dropdown-content { +display: none; +position: absolute; +background-color: #333333; +min-width: 160px; +z-index: 1; +top: 100%; +left: 0; +border-radius: 0 0 10px 10px; +} + +.dropdown-content a { +color: white; +padding: 12px 16px; +text-decoration: none; +display: block; +text-align: left; +} + +.dropdown-content a:hover { + +} + +.dropdown-content a:last-child { +border-radius: 0 0 10px 10px; +} + +.dropdown:hover .dropdown-content { +display: block; +} + +.dropdown:hover { + } /* @@ -327,4 +365,3 @@ nav { text-decoration: inherit; } /* styles.css */ - diff --git a/dead-drop.php b/dead-drop.php index d8cfbe1..70a92b8 100755 --- a/dead-drop.php +++ b/dead-drop.php @@ -27,15 +27,22 @@ + @@ -63,6 +70,7 @@

+ diff --git a/mars-clock.php b/mars-clock.php index 765009f..d31d9f4 100755 --- a/mars-clock.php +++ b/mars-clock.php @@ -5,7 +5,7 @@ dpolakovic.space - + @@ -68,15 +68,23 @@ setInterval(() => { - @@ -93,7 +101,7 @@ setInterval(() => {

- +Mars clock 1.0.3 --------------------------------------------------------- Earth | Time | Date | --------------------------------------------------------- @@ -106,35 +114,94 @@ Tokyo | | Jezero Crater | | | -Gale Crater | | | +Jezero Crater | | | +Gale Crater | | | Olympus Mons* | | | -Tharsis Tholus | | | -Conv. Prime Meridian | | | +Tharsis Tholus | | | +Airy-0 | | |

--------------------------------------------------------- -* 0 offset time zone +* 0 offset time zone

- The idea was to create the most humanly readable modification of the -Darian calendar - On contrary to the original, the epoch starts on UTC 00:00 11th April, - 1609 (invention / first use of telescope) with year 1, not year 0. Aditionaly, the time zone with zero offset was chosen not - conventionally (the first landing spot / prime meridian) but rather by matching the - converted time with actual daylight on the Red Planet. + The idea was to create the most humanly readable modification of the Darian calendar. + I named it Scarlett calendar. Sol (a Martian day) has + 24 hours like Earth day, but Martian second is just slightly longer (as can + be seen in the clock itself) which results in day length of 24 hours, 37 minutes and + approximately 23 seconds. Martian weeks have 7 sols, every month has exactly 4 weeks and Martian + year has 24 months. This is basicaly same as in original Darian calendar. Complete + layout can bee seen + here. +

+

+ Differences start with the prime meridian, which was chosen not conventionally (the first landing spot of man-made object) + but rather by matching the time with actual daylight (sollight?) on the Red Planet. + This way, prime meridian happens to match the location of the highest mountain on Mars (and Solar System), Olympus Mons. + Because the difference, time zone with new prime meridian is called "0 offset time zone" + just to avoid confusion with the NASAs one (Airy-0). + Table below lists all time zones, with most notable landmark in it. +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MTZLongitude intervalLandmarkLocationNote
-1155°E – 70°ESchroeter Crater55.6°E
-1070°E – 85°EJezero Crater77.58°EPerseverance rover
-985°E – 100°EDu Martheray Crater93.5°E
-8100°E – 115°ETyrrhena Patera~105°EZhurong rover
-7115°E – 130°EArrhenius Crater122.6°E
-6130°E – 145°EGale Crater137.8°ECuriosity rover
-5145°E – 160°EElysium Mons147.21°E
-4160°E – 175°EReuyl Crater166.8°E
-3170°W – 175°EPettit Crater174.0°W
-2155°W – 170°WNewton Crater158.1°W
-1140°W – 155°WAmazonis Mensa149.06°W
0125°W – 140°WOlympus Mons133.88°WNew prime meridian
+1110°W – 125°WPavonis Mons112.96°W
+295°W – 110°WAscraeus Mons104.08°W
+380°W – 95°WTharsis Tholus90.69°W
+465°W – 80°WHebes Chasma76.2°W
+550°W – 65°WMutch Crater55.3°W
+635°W – 50°WOrson Welles Crater45.9°W
+720°W – 35°WAureum Chaos27°W
+85°W – 20°WIani Chaos~18°W
+95°W – 10°EAiry-00°Conventional prime meridian
+1010°E – 25°ESchiaparelli Crater16.7°E
+1125°E – 40°EAres Vallis25.8°E
+1240°E – 55°ETeisserenc de Bort Crater45°E
+

+

+Note, + that geographic features spanning trough multiple time zones are not included, to + avoid confusion. +

- Note, that original Darian calendar designates the first + Darian calendar starts on Earths date UTC 00:00 11th April 1609 which + is an astronomical convention for first use of telescope in the field. My modification + starts with year 1, not year 0 like the original. Darian calendar also designates + the first day of each month as the start of a new week, which results in a one-day weekend occurring - three or four times a year. I am uncertain how this would be received by future Martian - colonists, so I didn't implemented this feature as well as - winter/summer time shifts or any holidays whatsoever. + three or four times a year. I am not certain how this would be received by future Martian + colonists, so I didn't implemented Martian day names, week count as well as + winter/summer time shifts or any holidays whatsoever in Scarlett calendar.

- Also, this site is not very useful extraterrestrially, - so I made a portable version which you can fit on your Raspberry - Pi or any device running Java. It runs in GUI mode and terminal as well. + Since the calendar is on the web, it is not very useful extraterrestrially. + So I made a portable version which you can fit on your Raspberry + Pi or any portable device running Java. It runs in GUI mode and terminal as well and is + released under GPL so you can download, use and modify it for free.

@@ -149,7 +216,7 @@ Conv. Prime Meridian | | | colonization candidates have a problem adopting a customized timekeeping format due to their vastly different synodic rotation periods compared to that of Earth. Homo sapiens are biologically programmed to function on a - 24–26-hour day. Therefore, it is much easier to implement the classic + 24 to 26-hour day. Therefore, it is much easier to implement the classic Gregorian calendar with a 24-hour day and disregard the actual daylight period (especially since the thin atmospheres and natural luminous intensity would require artificial lighting anyway). @@ -179,7 +246,8 @@ Conv. Prime Meridian | | | Publications on this domain are licensed under CC BY-SA 4.0.
- This site uses client-side scripting. Please, read the source code + This site uses client-side scripting. + Please, read the source code here for more information.

diff --git a/php/clock-mars.php b/php/clock-mars.php index 0941350..d15286b 100644 --- a/php/clock-mars.php +++ b/php/clock-mars.php @@ -2,8 +2,8 @@ require_once('config.php'); require_once('time.php'); ?> -Jezero Crater | | | -Gale Crater | | | +Jezero Crater | | | +Gale Crater | | | Olympus Mons* | | | -Tharsis Tholus | | | -Conv. Prime Meridian | | | +Tharsis Tholus | | | +Airy-0 | | | diff --git a/php/dd2.php b/php/dd2.php index 44c2239..778cb32 100644 --- a/php/dd2.php +++ b/php/dd2.php @@ -1,16 +1,20 @@ +If you don\'t know the W3W coordinates for location you want to check, +just click on the question mark next to the search box. Make sure to +use English coordinates.

+

'); require_once 'captcha.php'; @@ -105,13 +109,14 @@ HTML;
- +


-

$text_bottom +

+ HTML; } @@ -150,8 +155,10 @@ HTML; echo "

{$result['message']}
"; } } elseif ($result['mode'] === 'stashed') { - echo "

Message stashed at " . htmlentities($result['w3w']) ."

Your dead drop is hot.


"; + echo "

Message stashed at " . htmlentities($result['w3w']) ."

Your dead drop is hot. Continue.


"; } + + } function deadDropLogic() { diff --git a/php/rnd.txt b/php/rnd.txt deleted file mode 100755 index 5cad212..0000000 --- a/php/rnd.txt +++ /dev/null @@ -1,30 +0,0 @@ -I unironically liked The Phantom Menace. -I willingly play healers in D&D. -I prefer Star Trek DS9 over the TNG. -J bn gbo pg dszquphsbgz ;-) . -I prefer pencils over pens. -I still use floppy disks for backups. -I think way too much about time travel. -I own ~200g of meteorites. -I am fascinated by left-handed people. -I like to randomly browse Wikipedia. -I am fan of Detroit Red Wings. -I love pickles, even fried ones. -I have one cat. -yo aprendo español. -I still believe that Huki and Maku were a thing. -I liked the original Metroid more than Super Metroid. -I don't like pudding. -I don't use Arch btw. -I don't play Protos in Starcraft. -I don't drink coffee. -my favorite visual artist is Edvard Hopper. -my favorite author is Eric Arthur Blair. -my favorite super hero is Batman. -my favorite ninja turtle is Donnie. -my favorite board game is Talisman (4th ed). -my favorite season is autumn. -my favorite Pokemon is #95, Onix. -my favorite ice cream flavor is vanilla. -my favorite junk food is fish sticks. -my favorite dinosaur is pterodactyl. \ No newline at end of file diff --git a/php/time.php b/php/time.php index 770a309..b50c52d 100644 --- a/php/time.php +++ b/php/time.php @@ -1,12 +1,8 @@ "; - //echo "Data valid to time: ". $current_time . "
"; -} +$time_t; +$current_time = date('H:i:s', $time_t); + function timeEarth($timezone) { try { @@ -36,7 +32,7 @@ function get_time_m(){ function timeMars($offset) { $time_m = get_time_m(); - $time_m = $time_m - ($offset * 3600); + $time_m = $time_m + ($offset * 3600); $hrs = floor(($time_m % 86400) / 3600); $min = floor(($time_m % 3600) / 60); @@ -49,7 +45,7 @@ function timeMars($offset) { function dateMars($offset) { $time_m = get_time_m(); - $time_m = $time_m - ($offset * 3600); + $time_m = $time_m + ($offset * 3600); $time_m_days = $time_m / 86400; $year = 1;