The time.Offset resource calculates a future or past timestamp by applying offsets to a base time.
Example Usage#
Basic Offset#
Multiple Offsets#
Custom Base Time#
Past Timestamps#
Argument Reference#
Optional Arguments#
baseRfc3339(string): Base timestamp in RFC3339 format. Defaults to current time.offsetDays(number): Number of days to offset (positive for future, negative for past).offsetHours(number): Number of hours to offset.offsetMinutes(number): Number of minutes to offset.offsetMonths(number): Number of months to offset.offsetSeconds(number): Number of seconds to offset.offsetYears(number): Number of years to offset.triggers(map): Arbitrary map of values that triggers recreation.
Attribute Reference#
day(number): Day of the month (1-31).hour(number): Hour of the day (0-23).minute(number): Minute of the hour (0-59).month(number): Month of the year (1-12).rfc3339(string): Full timestamp in RFC3339 format.second(number): Second of the minute (0-59).unix(number): Unix timestamp (seconds since epoch).year(number): Year.
Use Cases#
Certificate Expiration#
License Management#
Scheduled Events#
Maintenance Windows#
Import#
Time offset resources cannot be imported as they represent calculations rather than existing infrastructure.
Notes#
- All times are in UTC
- Offsets are cumulative (days + hours + minutes, etc.)
- Base time defaults to the time of resource creation
- Resource is recreated if triggers change