Current Time
Outputs the current moment in ISO and local date/time forms.
@lainstack/time/current · Data
How to use it
Section titled “How to use it”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.
timezonedefaults toUTC. It changes onlylocalIso,date,timeandresolvedTimezone.isoandepochMsdo not change.- An unknown timezone name fails the step. Use an IANA name such as
Europe/Rome. dateandtimeare the local values in that timezone, so near midnight they can differ from the UTC date iniso.- Feed
dateinto@lainstack/time/date-mathfor a date input, orisoorlocalIsofor a date and time input.
Settings
Section titled “Settings”| Setting | Key | Type | Details |
|---|---|---|---|
| Timezone (required) | timezone |
Text | IANA timezone used for local date and time fields. |
Outputs
Section titled “Outputs”| 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 |