ComfyUI > Nodes > ComfyUI-LogicUtils > Current Timestamp

ComfyUI Node: Current Timestamp

Class Name

CurrentTimestamp

Category
Logic Gates
Author
aria1th (Account age: 3016days)
Extension
ComfyUI-LogicUtils
Latest Updated
2026-01-21
Github Stars
0.1K

How to Install ComfyUI-LogicUtils

Install this extension via the ComfyUI Manager by searching for ComfyUI-LogicUtils
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-LogicUtils in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Current Timestamp Description

Provides current time as Unix timestamp or formatted string for AI art projects.

Current Timestamp:

The CurrentTimestamp node is designed to provide you with the current time in either a Unix timestamp format or a human-readable formatted string. This node is particularly useful when you need to incorporate time-based data into your AI art projects, such as time-stamping generated content or synchronizing events. By offering both raw and formatted time outputs, it allows for flexibility depending on your specific needs. Whether you're looking to log events with precision or display the current date and time in a more readable format, this node simplifies the process by handling the conversion for you.

Current Timestamp Input Parameters:

format_string

The format_string parameter determines the format in which the current time will be returned. If you leave this parameter blank, the node will output the current Unix timestamp, which is a numerical representation of the time elapsed since January 1, 1970. However, if you provide a format string using standard time format directives (such as '%Y-%m-%d %H:%M:%S'), the node will return the current time as a formatted string. This allows you to customize the output to match your specific requirements, whether you need a simple date or a detailed timestamp. The default value is an empty string, which results in the Unix timestamp output.

Current Timestamp Output Parameters:

STRING

The output parameter is a STRING, which can either be a formatted date/time string or a Unix timestamp represented as a string. When the format_string is provided, the output will be a human-readable date and time formatted according to the specified directives. If the format_string is left blank, the output will be the current Unix timestamp, which is useful for precise time calculations and logging. This flexibility allows you to choose the format that best suits your project's needs.

Current Timestamp Usage Tips:

  • To obtain a simple Unix timestamp, leave the format_string parameter blank. This is useful for logging or when you need a precise time reference.
  • Use standard time format directives in the format_string to customize the output. For example, '%Y-%m-%d %H:%M:%S' will give you a detailed date and time format.

Current Timestamp Common Errors and Solutions:

Invalid format string

  • Explanation: If the format_string contains invalid directives or characters, the node may not be able to format the time correctly.
  • Solution: Ensure that the format_string uses valid time format directives. Refer to Python's time.strftime documentation for a list of supported directives.

Empty output

  • Explanation: If the node returns an empty output, it might be due to an unexpected error in processing the format_string.
  • Solution: Double-check the format_string for any syntax errors or unsupported characters. If the issue persists, try using a different format or leaving it blank to get the Unix timestamp.

Current Timestamp Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-LogicUtils
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.