Skip to content

Current Time

Outputs the current moment in ISO and local date/time forms.

@lainstack/time/current · Data

Use this block to read the current date and time when the block runs. Its outputs are iso (UTC), epochMs, localIso (with the offset of the timezone), date, time, and resolvedTimezone. To add or subtract time from a value, use @lainstack/time/date-math. To pause the run, use @lainstack/time/wait.

  • It reads the clock again each time it runs. If two later blocks need the same instant, reference this block’s output. Do not add a second block.
  • timezone defaults to UTC. It changes only localIso, date, time and resolvedTimezone. iso and epochMs do not change.
  • An unknown timezone name fails the step. Use an IANA name such as Europe/Rome.
  • date and time are the local values in that timezone, so near midnight they can differ from the UTC date in iso.
  • Feed date into @lainstack/time/date-math for a date input, or iso or localIso for a date and time input.
Setting Key Type Details
Timezone (required) timezone Text IANA timezone used for local date and time fields.
Output Path Type
ISO timestamp iso Text
Epoch milliseconds epochMs Number
Resolved timezone resolvedTimezone Text
Local ISO timestamp localIso Text
Date date Date
Time time Text