Formatting Time

The time format type is supported with the styles short, medium, long, and full. By default, the runtime time zone is used. It is also possible to specify a time zone as a style argument (UTC or as a IANA time zone database code such as Europe/Paris).

Format Style Message Example Result Example (en-US)
short {0,time,short} '1995-12-17T03:24:12'"3:24 AM"
medium {0,time,medium} '1995-12-17T03:24:12'"3:24:12 AM"
long {0,time,long} '1995-12-17T03:24:12' "3:24:12 AM GMT+1"
full {0,time,full} '1995-12-17T03:24:12'"3:24:12 AM GMT+1"
full {0,time,full:UTC} '1995-12-17T03:24:12' "3:24:12 AM UTC"