User Guide

348 Chapter 18 Interacting with Remote Servers
In the CFML implementation, useTimezoneInfo is an attribute of the cfwddx
action=cfml2wddx tag. In the JavaScript implementation, useTimezoneInfo (note
the case sensitivity of JavaScript) is a property of the
WddxSerializer object.
Date-time values in WDDX are represented using a subset of the ISO8601 format.
Time zone information is represented as an hour/minute offset from UTC; for
example, 1998-9-8T12:6:26-4:0.
During WDDX deserialization to CFML, time zone information is automatically
taken into account and all date-time values are converted to local time. In this way,
UTC is taken out of the picture entirely and you do not need to worry about the
details of time zone conversions.
However, during deserialization to JavaScript expressions, time zone information is
not taken into account. Complications arise because of the difficulty of determining
the time zone of the browser.
How WDDX works
The WDDX vocabulary describes a data object with a high level of abstraction. For
instance, a simple structure with two string variables might have the following form
after it is serialized into a WDDX XML representation:
<var name=x>
<struct>
<var name=a>
<string>Property a</string>
</var>
<var name=b>
<string>Property b</string>
</var>
</struct>
</var>
When the WDDX Deserializer object deserializes this XML, it creates a structure that
is also created by either of the following scripts:
The WddxSerializer and WddxDeserializer objects are defined in the file CFIDE/
scripts/wddx.js. For detailed information on these JavaScript objects, see the CFML
Reference.
JavaScript CFScript
x = new Object();
x.a = "Property a";
x.b = "Property b";
x = structNew();
x.a = "Property a";
x.b = "Property b";