Datetime Now
Grab a timestamp at an exact point in your graph
- flow
- dependency
- flow
- DATETIME
The starting point for anything time-related in JNComfy (jn-jairo/jn_comfyui): this node captures the current timestamp as a DATETIME value the moment it executes. Feed that into JN_DatetimeFormat for a display string, JN_DatetimeInfo to pull the components apart, or subtract two of them (via JN_MathOperation) to measure elapsed time with JN_TimedeltaInfo.
Why "when it executes" actually matters
This is the detail that makes JN_DatetimeNow more than a trivial wrapper around Python's datetime.now(). ComfyUI schedules nodes by data dependency, not visual position - a node doesn't necessarily run "when you'd expect" just because you dragged it earlier on the canvas. That's exactly why this node ships optional flow and dependency inputs, the same manual-ordering mechanism used across this pack's workflow-control family (JN_Flow, JN_StopIf, JN_Exec, JN_CoolDown): they let you pin precisely where in your execution sequence the timestamp gets taken, so "now" genuinely means the moment you intended, not whenever ComfyUI's scheduler happened to get around to it.
That's what makes a timing recipe possible: put one JN_DatetimeNow before a slow branch and another after it, chain both through flow so their positions are actually guaranteed, then subtract the two DATETIME values (JN_MathOperation's a - b works here since both operands are the generic * type) to get a TIMEDELTA you can break down with JN_TimedeltaInfo.
How it works
Every input is optional. title is a label, useful once you've got more than one DatetimeNow in a graph and need to tell them apart in a Dump node or in logs. flow and dependency are the manual-sequencing wires described above - without them, this node just runs whenever ComfyUI's normal data-dependency scheduling gets to it, which may not be the exact instant you had in mind.
The inputs and outputs that matter
title(STRING, default empty, optional) - a label for this capture point.flow(any type, optional) - wire in from an upstream flow-chain node to control exactly when this executes.dependency(any type, optional) - an alternate wait-on input, same purpose asflow.
Two outputs: flow passes the execution chain forward to whatever runs next, and DATETIME is the actual timestamp - wire that into JN_DatetimeFormat, JN_DatetimeInfo, or a JN_MathOperation subtraction.
How to install it
Via ComfyUI Manager: search "JNComfy", install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/jn-jairo/jn_comfyui
then restart ComfyUI. This is a small, single-author pack with no meaningful public discussion anywhere we could find and no entry in our knowledge base - the timing-recipe pattern described above isn't documented in the README either, it follows directly from how the schema's flow/dependency fields work.
Common issues & troubleshooting
Two DatetimeNow nodes return the same or nearly-identical timestamp when you expected a real gap. If they're not actually chained through flow/dependency around whatever's supposed to happen between them, ComfyUI may execute both close together regardless of where they sit visually on the canvas. Verify the chain is real, not just implied by node placement.
Timestamp looks like it's in the wrong timezone. This node returns whatever datetime.now()-equivalent your Python environment resolves to - typically local system time. If you need UTC specifically and it's not, that's an environment/system clock question, not something exposed as a node parameter here.
You don't actually need precise sequencing, just "some timestamp." If you're not timing anything and just want a value for a filename, you can skip the flow/dependency wiring entirely and let normal scheduling handle it - the ordering guarantee only matters when you're measuring elapsed time between two specific points.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| titleopt | STRING | — | |
| flowopt | * | — | |
| dependencyopt | * | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| flow | * | — |
| DATETIME | DATETIME | — |