capturegraph.procedures.nodes.automatic.operators.time
#
Time operator procedures perform calculations and manipulations on time values. These procedures enable time arithmetic, formatting, and conversion operations within workflows.
AddTimeInterval
#
Adds a time interval (in seconds) to a given time.
Creates a new timestamp by adding the specified number of seconds to the input time. Useful for scheduling, calculating future times, or creating time offsets in procedures.
Attributes:
| Name | Type | Description |
|---|---|---|
time |
Procedure[PTime]
|
The base time to add the interval to |
seconds |
Procedure[PNumber]
|
The number of seconds to add to the time |
Source code in capturegraph-lib/capturegraph/procedures/nodes/automatic/operators/time.py
GetBeginningOfDay
#
Gets the beginning of the day (midnight) for a given time.
Truncates the time portion and returns the start of the same day (00:00:00). Useful for date-only comparisons and day-based grouping of data.
Attributes:
| Name | Type | Description |
|---|---|---|
time |
Procedure[PTime]
|
The time to get the beginning of day for |
Source code in capturegraph-lib/capturegraph/procedures/nodes/automatic/operators/time.py
GetSecondsSince1970
#
Converts a time to seconds since Unix epoch (January 1, 1970).
Returns the timestamp as a number representing seconds elapsed since the Unix epoch. Useful for time calculations, comparisons, and interoperability with systems that use Unix timestamps.
Attributes:
| Name | Type | Description |
|---|---|---|
time |
Procedure[PTime]
|
The time to convert to Unix timestamp |
Source code in capturegraph-lib/capturegraph/procedures/nodes/automatic/operators/time.py
GetTimeDifferenceSeconds
#
Calculates the difference between two times in seconds.
Subtracts the right time from the left time and returns the result in seconds. Positive values indicate left is later than right.
Attributes:
| Name | Type | Description |
|---|---|---|
left |
Procedure[PTime]
|
The first (later) time |
right |
Procedure[PTime]
|
The second (earlier) time |