FIX: Incorrect Date Formats When You Use GenerateXMLForDictionaryUsingSchema Method of DictionaryXMLTransform Object (322753)



The information in this article applies to:

  • Microsoft Commerce Server 2002

This article was previously published under Q322753

SYMPTOMS

If a server is configured with a system locale of United Kingdom and the system runs the following code, the date is output in U.S. English date format instead of United Kingdom date format:


Dim objXMLDom
Dim objAttributeNode
Dim objNode
 
Set objXMLDom = CreateObject("MSXML.DOMDocument")
Set objNode = objXMLDom.createNode(1, "testme", "")
 
Set objAttributeNode = objXMLDom.createNode(2, "test", "") objAttributeNode.nodeValue = CDate("31/1/2002")
 
objNode.Attributes.setNamedItem(objAttributeNode)
Wscript.echo objNode.xml

OUTPUT >> <testme test="1/31/2002"><BR/>
				


If an application tries to use this data, it reads the date as January 1st, because it interprets the date through United Kingdom style dates.

CAUSE

This problem occurs when you all the GenerateXMLForDictionaryUsingSchema to convert an orderform into an XML document. The d_datecreated field that is specified in the schema is created in U.S. English format instead of the locale information that is on the system.

RESOLUTION

To resolve this problem, obtain the latest service pack for Commerce Server 2002. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

328814 INF: How to Obtain the Latest Commerce Server 2002 Service Pack

The English version of this fix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
   Date         Time                Size    File name                   Platform
   -----------------------------------------------------------------------------
   25-Jun-2002  03:22 PM4.5.0.2203  77,930  Dictionaryxmltransforms.dll x86
				

STATUS

Microsoft has confirmed that this is a problem in Commerce Server 2002. This problem was first corrected in Commerce Server 2002 Service Pack 1 (SP1).

Modification Type:MinorLast Reviewed:9/27/2005
Keywords:kbHotfixServer kbQFE kbbug kbCommServ2002preSP1fix kbCommServ2002SP1fix kbfix KB322753