github.com/hugorut/terraform@v1.1.3/website/docs/language/functions/timeadd.mdx (about)

     1  ---
     2  page_title: timeadd - Functions - Configuration Language
     3  description: |-
     4    The timeadd function adds a duration to a timestamp, returning a new
     5    timestamp.
     6  ---
     7  
     8  # `timeadd` Function
     9  
    10  `timeadd` adds a duration to a timestamp, returning a new timestamp.
    11  
    12  ```hcl
    13  timeadd(timestamp, duration)
    14  ```
    15  
    16  In the Terraform language, timestamps are conventionally represented as
    17  strings using [RFC 3339](https://tools.ietf.org/html/rfc3339)
    18  "Date and Time format" syntax. `timeadd` requires the `timestamp` argument
    19  to be a string conforming to this syntax.
    20  
    21  `duration` is a string representation of a time difference, consisting of
    22  sequences of number and unit pairs, like `"1.5h"` or `"1h30m"`. The accepted
    23  units are `"ns"`, `"us"` (or `"µs"`), `"ms"`, `"s"`, `"m"`, and `"h"`. The first
    24  number may be negative to indicate a negative duration, like `"-2h5m"`.
    25  
    26  The result is a string, also in RFC 3339 format, representing the result
    27  of adding the given direction to the given timestamp.
    28  
    29  ## Examples
    30  
    31  ```
    32  > timeadd("2017-11-22T00:00:00Z", "10m")
    33  2017-11-22T00:10:00Z
    34  ```