From ef3d19db9a96de6220bb677987e02c7c37ad6d16 Mon Sep 17 00:00:00 2001 From: Sebastian Krupinski Date: Sat, 4 Jul 2026 19:02:07 -0400 Subject: [PATCH] feat: implement now epoch Signed-off-by: Sebastian Krupinski --- shared/lib/Utile/Timestamp.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/shared/lib/Utile/Timestamp.php b/shared/lib/Utile/Timestamp.php index 14f8917..c6b6d4c 100644 --- a/shared/lib/Utile/Timestamp.php +++ b/shared/lib/Utile/Timestamp.php @@ -15,6 +15,10 @@ use DateTimeZone; final class Timestamp { + public static function now(): int { + return self::toEpoch(new DateTimeImmutable('now')); + } + public static function normalize(mixed $value): ?int { if ($value instanceof DateTimeInterface) { return self::toEpoch($value);