# Duration format

> Understand the human-readable duration format used by Stackable operators, based on Go's time.ParseDuration, with units like days, hours, minutes, and seconds.

All Stackable operators use a human-readable duration format. It very closely resembles the format used by the [Go](https://go.dev/) programming language - which Kubernetes uses internally. Every duration field of a [CustomResource](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/), for example, the [`spec.workers.roleConfig.gracefulShutdownTimeout`](https://docs.stackable.tech/home/stable/trino/usage-guide/operations/graceful-shutdown/index.md) field, supports this format. There is no official format specification, but the source code of [`time.ParseDuration`](https://cs.opensource.google/go/go/+/refs/tags/go1.21.2:src/time/format.go;l=1589) in the Go standard library can be used as an implementation reference.

The format looks like this: `15d18h34m42s`. [Trino](https://docs.stackable.tech/home/stable/trino/index.md), for example, uses it in the following way:

```yaml
# ...
spec:
  workers:
    roleConfig:
      gracefulShutdownTimeout: 15d18h34m42s
```

Valid time units are: `d`, `h`, `m`, `s`, and `ms`. Separating the duration fragments, which is a tuple of time value and time unit (`15d`), by spaces is **not** supported and will result in an error. The maximum amount of time which can safely be represented without precision loss or integer overflow is 584,942,417,355 years. See [here](https://doc.rust-lang.org/std/time/struct.Duration.html#associatedconstant.MAX) for more information.
