Mark Murphy over on cf-talk pointed out an interesting WDDX bug. When converting CFML times to JS, times get converted to AM. Consider the following code that he posted:

<cfscript>
timestruct = structnew();
timestruct["am"] = createdatetime(2004, 5, 24, 02, 10, 05); timestruct["pm"] = createdatetime(2004, 5, 24, 14, 10, 05);</cfscript>

<script>
<cfwddx action="cfml2js" input="#timestruct#" toplevelvariable="jstimeobject"> document.write("The AM time is: " + jstimeobject.am); document.write("<BR>"); document.write("The PM (incorrect) time is: " + jstimeobject.pm);</script>

<BR><BR>
The cfmx wddx2js code is:<BR>
<cfwddx action="cfml2js" input="#timestruct#" toplevelvariable="jstimeobject">

This will demonstrate the bug. In case you are wondering, if you don't use the cf-js shortcut and go to a WDDX packet and then to JS, you still get the bug, even though the WDDX packet does show the correct times.

Something to keep in mind. Also don't forget that while you can use CFWDDX to serialize a CFC, it does not work correctly. Upon deserialization you will not have a proper CFC.