Skip to content

getUtcNow

getUtcNow(): string
import { getUtcNow } from "@northguild/gmt/utc/get";

Return the current UTC instant as an ISO Instant string.

  • Uses Temporal.Now.instant() to get current UTC time.
  • Returns “” on failure.

ISO Instant string (e.g. “2024-02-29T00:00:00Z”) or “” on failure

getUtcNow() // "2024-02-29T00:00:00Z"
getUtcNow() // "" (on failure)

utc/get/getUtcNow.ts