Skip to main content

Now

Gets the current date and time in a specified format and timezone.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.

Output

  • Time - Current date/time formatted according to the selected layout and timezone.

Options

  • Timezone Offset - The timezone for the current time. Options include:

    • Local - Uses the system's local timezone (default)
    • UTC offsets - Predefined timezone offsets from UTC-12:00 to UTC+14:00
      • Examples: UTC-05:00 (Eastern), UTC+00:00 (GMT/UTC), UTC+05:30 (India), UTC+09:00 (Japan)
    • Custom - Enter a custom timezone offset (requires Custom Timezone Offset field)
  • Custom Timezone Offset - Custom timezone offset when "Custom" is selected. Format examples:

    • +05:30 (India Standard Time)
    • -03:15 (3 hours 15 minutes behind UTC)
    • UTC+09:45 (with UTC prefix)
  • Layout - The date/time format for the output. Options include:

    • ANSIC - Mon Jan 2 15:04:05 2006
    • UnixDate - Mon Jan 2 15:04:05 MST 2006
    • RubyDate - Mon Jan 02 15:04:05 -0700 2006
    • RFC822 - 02 Jan 06 15:04 MST
    • RFC822Z - 02 Jan 06 15:04 -0700
    • RFC850 - Monday, 02-Jan-06 15:04:05 MST
    • RFC1123 - Mon, 02 Jan 2006 15:04:05 MST
    • RFC1123Z - Mon, 02 Jan 2006 15:04:05 -0700
    • RFC3339 - 2006-01-02T15:04:05-07:00 (default, ISO 8601)
    • RFC3339Nano - 2006-01-02T15:04:05.000000000-07:00
    • Custom - Define a custom format (requires Custom Format field)
  • Custom Format - Custom date/time format string when "Custom" layout is selected. Use Go time format reference:

    • 2006 - Year (4 digits)
    • 01 - Month (2 digits)
    • 02 - Day (2 digits)
    • 15 - Hour (24-hour format)
    • 04 - Minute
    • 05 - Second
    • Example: 2006-01-02 15:04:05 outputs 2024-03-15 14:30:45

How It Works

The Now node retrieves the current system time and formats it according to your specifications. When executed, the node:

  1. Gets the current system time
  2. Applies the specified timezone offset (if not using Local)
  3. Formats the time according to the selected layout
  4. Outputs the formatted time string

Use Cases

Recording Timestamps

  • Add timestamps to log entries
  • Track when automation tasks are executed
  • Create dated filenames for reports

Timezone-Aware Operations

  • Get current time in different timezones for global operations
  • Schedule tasks based on specific timezone requirements
  • Convert local time to UTC for API calls

Custom Time Formatting

  • Format timestamps for specific system requirements
  • Create human-readable date strings
  • Generate ISO 8601 compliant timestamps

Examples

Example 1: Get Current Local Time

Timezone Offset: Local
Layout: RFC3339
Output: 2024-03-15T14:30:45+03:00

Example 2: Get Current UTC Time

Timezone Offset: UTC+00:00
Layout: RFC3339
Output: 2024-03-15T11:30:45Z

Example 3: Get Time in Specific Timezone

Timezone Offset: UTC+05:30 (India)
Layout: RFC3339
Output: 2024-03-15T17:00:45+05:30

Example 4: Custom Format for Filenames

Timezone Offset: Local
Layout: Custom
Custom Format: 2006-01-02_15-04-05
Output: 2024-03-15_14-30-45

Example 5: Human-Readable Format

Timezone Offset: Local
Layout: Custom
Custom Format: Monday, January 02, 2006 at 3:04 PM
Output: Friday, March 15, 2024 at 2:30 PM

Tips for Effective Use

  • Use RFC3339 for APIs - Most web APIs expect ISO 8601 format, which RFC3339 provides
  • Local vs UTC - Use Local for user-facing timestamps, UTC for system operations and logs
  • Consistent Formats - Use the same format throughout your automation for consistency
  • Custom Formats for Files - When creating filenames, avoid characters like : that may be invalid on some systems
  • Timezone Awareness - Always consider timezone implications when scheduling or comparing times across regions

Common Errors and Solutions

Error: "custom format string is empty"

  • Cause: Custom layout selected but no format string provided
  • Solution: Either provide a custom format string or select a predefined layout

Error: "invalid custom format string"

  • Cause: The custom format string uses invalid syntax
  • Solution: Use valid Go time format reference tokens (2006, 01, 02, 15, 04, 05)

Error: "custom timezone offset is empty"

  • Cause: Custom timezone selected but no offset provided
  • Solution: Provide a valid offset like +05:30 or -03:00

Error: "invalid UTC offset format"

  • Cause: The custom timezone offset uses incorrect format
  • Solution: Use format like +HH:MM, -HH:MM, UTC+HH:MM, or UTC-HH:MM