Time Now
A Fresh Timestamp Every Run (Your Filenames Will Thank You)
- trigger
- now
If you've ever overwritten a render you wanted to keep, you know why timestamping matters. Time Now grabs the current local date and time and hands it to you as a DATETIME object - and crucially, it re-evaluates on every single run. No caching, no stale value, no "wait, that timestamp is from yesterday." It's the foundation for filenames that never collide.
How it works
This is part of StableLlama's Basic data handling pack, which defines DATETIME and TIMEDELTA as custom data types. That last bit is the most important thing to understand: the output here is not a string. It's a DATETIME object that only speaks to other nodes in this pack - TimeFormat (to turn it into a string), TimeExtract (to pull out components), TimeToUnix, and the add/subtract/delta nodes.
There are two things worth knowing about the mechanism:
- The output is marked with
IS_CHANGED, so ComfyUI treats it as changed on every execution - that's how you get a guaranteed-fresh timestamp each run instead of a cached one. This is a genuine feature, not an accident. - There's one optional input:
trigger(type ANY). It does nothing to the value - it exists so you can wire a signal in to force the node to re-execute at a moment you choose. If a node upstream changes and you want the timestamp to refresh in step, connect it.
Output: now, a DATETIME. That's it.
The pipeline that makes it useful
The classic graph is Time Now → Time Format:
- Time Now produces the current DATETIME.
- Time Format turns it into a string like
2026-08-16_14-30-05. - That string becomes your output filename prefix - via the pack's save nodes, a filename builder, or whatever naming approach your workflow uses.
This matters more than it sounds. ComfyUI's built-in %date% template strings in save nodes are famously unreliable - on Windows in particular, users report them silently clobbering video outputs or failing with "folder/file doesn't exist" errors (there's a whole thread about it on r/comfyui). Building the timestamp yourself with these nodes sidesteps the template-string roulette entirely. It's the workaround people actually reach for.
Installing it
Search "Basic data handling" in ComfyUI Manager and restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/StableLlama/ComfyUI-basic_data_handling
Restart and it's there. No models, no dependencies.
Gotchas
The DATETIME value only plugs into this pack's time nodes - you can't drop it straight into a STRING input. If you try and the wire won't connect, you forgot the TimeFormat step in between. And because it's a fresh value every run, don't put Time Now where you need a stable timestamp for a whole batch - if you need the same time for 50 images, capture it once and reuse the string, or you'll get 50 subtly different names. Also note this is local time; if you need UTC, there's a sibling node for exactly that.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| triggeropt | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| now | DATETIME | — |