Date Values

Binary AMF represents date values with a 64-bit floating point value that specifies the number of milliseconds elapsed since January 1, 1970, midnight GMT, and a 16-bit signed integer value that specifies the timezone offset in minutes relative to GMT.

Date values are represented in XML in the following format: YYYY-MM-DD HH:MM:SS.mmm TZ:[+-]tzoffset

YYYY denotes a 4 digit year
MM denotes a 2 digit month (range: 01-12)
DD denotes a 2 digit day (range: 01-31);
HH denotes a 2 digit hour-of-day (range: 00-23)
MM denotes a 2 digit minute value (range: 00-59)
SS denotes a 2 digit seconds value (range: 00-59)
mmm denotes the 3 digit number of milliseconds value
tzoffset denotes the timezone offset to GMT in minutes

Because of the rounding of floating point values to the nearest millisecond it is generally not possible to reconstruct an exact binary representation from these string representations. For this reason, the original binary representation is also included in hexadecimal representation in square brackets. As long as such a date value is not customized, the hexadecimal representation can be used to exactly reconstruct the original date value when XML is transformed back to binary AMF.

When customizing a date value, the hexadecimal representation can either be deleted or left untouched. Regardless it is ignored when the XML representation is converted to binary AMF.

Example string representation of a date value: 2004-03-30·16:38:38.260·TZ:-300·[426F73945F768000FED4]