当前时间(戳)🐠meeeyo.com
A live clock in your graph — and the pack's built-in 'random' seed trick
- any
- STRING
- INT
GetCurrentTime is a two-output time node from the MeeeyoAI/ComfyUI_StringOps pack, and it does more than tell the time. It returns:
- a STRING - the current local time formatted as
YYYY-MM-DD HH:MM:SS, optionally prefixed; - an INT - the current Unix timestamp in milliseconds.
The README itself calls out the useful framing: that timestamp is a great source of "random" seeds. Because the node re-evaluates every queue run (this pack marks its nodes as always-changed), the millisecond timestamp is effectively a fresh, unpredictable integer each execution - plug it into a KSampler seed port and every run gets a new seed without you touching anything. GetRandomIntegerInRange in the same pack is the more honest random source; this one is the variant that also happens to be a real clock.
The inputs
- prefix - a string prepended to the time output. It's a simple prefix, not a format string: prefix
shotgives youshot 2026-08-11 09:41:03. Leave it empty for a bare timestamp.
There's also a wildcard any input that accepts anything and does nothing functionally - the author's habit across this pack is to use it for execution ordering in the graph.
What people actually use it for
Beyond seeds, the STRING output is a ready-made unique label: wire it (with a prefix like render) into SaveImagEX's image_name in this same pack and every saved image gets a timestamped filename, so nothing gets overwritten across runs. It also works as a log stamp - prefix the input with a note and you get a dated line you can send to a text node or file node. Because the time is generated at execution time rather than cached, the value is always current when the workflow actually runs, not when you last edited it.
Gotchas
The clock is local time - no timezone handling on the STRING side, even though the pack's requirements include pytz (that dependency is used elsewhere). If you're building filenames you want sorted globally, millisecond timestamps sort correctly; formatted local time does not, across machines on different timezones. And since it re-rolls every execution, don't use the INT output anywhere you need reproducibility - it's random by design.
Installing
Part of the standard pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/MeeeyoAI/ComfyUI_StringOps.git
or via ComfyUI Manager by searching ComfyUI_StringOps, then restart. No model downloads, light dependencies. It lives under "Meeeyo/Functional" in the node menu.
It's a tiny node, but "timestamped filenames" plus "always-fresh seed" covers two annoyances that otherwise cost you extra nodes or hand-typing. For that, one input is honestly a fair deal.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| prefix | STRING | — | |
| anyopt | * | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |
| INT | INT | — |