VAULOVAULO Help Center

Formatting Dates and Times

Timestamps such as updatedAt arrive as ISO 8601 values in UTC. This is how you output only the date, only the time or a localized format in the JSON template.

All timestamps in the AssetFeed are texts in ISO 8601 format in UTC, for example 2026-09-09T06:15:29.3944623Z. This applies to feed.generatedAt, asset.updatedAt, asset.exif.dateTime and asset.exif.gps.timestamp. Many systems can work with that directly. If you need only the date, only the time or a particular format, you format the value in the JSON template.

Recipes

The text is first turned into a date with date.parse and then emitted with date.to_string and a format pattern:

"date":    "{{ asset.updatedAt | date.parse | date.to_string "%Y-%m-%d" }}"          → 2026-09-09
"dateDe":  "{{ asset.updatedAt | date.parse | date.to_string "%d.%m.%Y" }}"          → 09.09.2026
"time":    "{{ asset.updatedAt | date.parse | date.to_string "%H:%M:%S" }}"          → 06:15:29
"short":   "{{ asset.updatedAt | date.parse | date.to_string "%H:%M" }}"             → 06:15
"long":    "{{ asset.updatedAt | date.parse | date.to_string "%A, %B %d, %Y" "en-US" }}" → Wednesday, September 09, 2026
"unix":    {{ asset.updatedAt | date.parse | date.to_string "%s" }}                   → 1788934529
"default": "{{ asset.updatedAt | date }}"                                             → 09 Sep 2026

Without a format pattern – {{ asset.updatedAt | date }} – you get the default format %d %b %Y.

Just cutting the text

Because the value always has the same shape, you can also cut the date and time out as text. This is the simplest way when you want to keep the values in UTC:

"date": "{{ asset.updatedAt | string.slice 0 10 }}"   → 2026-09-09
"time": "{{ asset.updatedAt | string.slice 11 8 }}"   → 06:15:29

Format codes

CodeResultMeaning
%Y2026Four-digit year
%y26Two-digit year
%m09Month
%d09Day
%e9Day without leading zero
%BSeptemberMonth name
%bSepShort month name
%AWednesdayWeekday
%aWedShort weekday
%H06Hour (24 h)
%I06Hour (12 h)
%M15Minute
%S29Second
%L394Milliseconds
%pAMAM or PM
%F2026-09-09ISO 8601 date, same as %Y-%m-%d
%T06:15:29Time, same as %H:%M:%S
%R06:15Time without seconds
%j252Day of the year
%V37ISO 8601 week number
%u3Weekday as number, Monday = 1
%s1788934529Unix timestamp in seconds
%Z+00:00Time zone offset
%%%A percent sign

Language of the names

Month and weekday names follow the culture you pass as the second argument, for example "de-DE", "en-US" or "fr-FR". Without it, English is used.

{{ asset.updatedAt | date.parse | date.to_string "%d. %B %Y" "de-DE" }}   → 09. September 2026
{{ asset.updatedAt | date.parse | date.to_string "%d %B %Y" "en-US" }}    → 09 September 2026

Time zone

date.parse yields the time in the time zone of the VAULO server, which is UTC. So 06:15:29Z becomes 06:15:29. There is no automatic conversion into another time zone inside the template. You have three options:

  • Convert in the external system. Emit the ISO value unchanged ("{{ asset.updatedAt }}") and leave the conversion to the system that reads the feed. This is the cleanest solution, because that system knows about daylight saving time.
  • Fixed offset. date.add_hours shifts the time by a fixed number of hours, for example for Central Europe in summer: {{ asset.updatedAt | date.parse | date.add_hours 2 | date.to_string "%H:%M" }} yields 08:15. You have to account for daylight saving changes yourself.
  • Date only. If the date is all you need, the time zone rarely matters.

Capture date from EXIF

asset.exif.dateTime is null when the file carries no capture time. A null cannot be formatted – so guard the case:

"takenOn": {% if asset.exif.dateTime %}"{{ asset.exif.dateTime | date.parse | date.to_string "%Y-%m-%d" }}"{% else %}null{% endif %}

On this page