Date/Time Formats

This section defines the date/time formats for use with the Hotel Ads XML messages and feeds.

Date

Dates are expressed in the following format:

YYYY-MM-DD

Where:

  • YYYY: Four-digit year
  • MM: Two-digit month
  • DD: Two-digit day

For example, "2017-12-31" for December 31st, 2017.

DateTime

DateTime uses the RFC 3339 format:

YYYY-MM-DDTHH:mm:ss.SSS+|-HH:mm[Z]

Where:

  • YYYY: Four-digit year
  • MM: Two-digit month
  • DD: Two-digit day
  • T: Separates the date from the time
  • HH: Hours
  • mm: Minutes
  • ss: (Optional) Seconds
  • SSS: (Optional) Milliseconds
  • +/-: (Optional) Separates the date and time from the timezone offset
  • HH:mm: (Optional) Hours and minutes in the timezone offset
  • Z: (Optional) Zero offset

For example, "2017-12-31T16:20:00-04:00".

You can also specify "Z" for the timezone offset, which indicates 0 offset.

Time

Time uses the RFC 3339 format:

HH:MM:SS+|-HH:MM[Z]

Where:

  • HH: Hours
  • MM: Minutes
  • SS: (Optional) Seconds
  • Z: (Optional) Zero offset

For example, "16:20:00-04:00".

You can optionally add a number of hours and minutes for the UTC offset as either positive ("+") or negative ("-").

You can also specify "Z" for the timezone offset, which indicates 0 offset.