{{- $offset := .Get "offset" | default 0 -}} {{- $convertedOffset := math.Mul $offset 24 -}} {{- $trimTime := .Get "trimTime" | default false -}} {{- $date := time.Now.Add (time.ParseDuration (print $convertedOffset "h")) -}} {{- $formattedDate := cond ($trimTime) ($date | time.Format "2006-01-02") (print ($date | time.Format "2006-01-02") "T00:00:00Z") -}} {{ $formattedDate }}