Details
-
New Feature
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
Client, Axis-C++, Xerces, Windows XP SP3, VS6
Description
It looks like the xsd_date & xsd_datetime fields are using the 'tm' structure. This structure does not support GMT/UTC time.
Currently a date looks like '2007-01-01-06:00' and a datetime '2007-01-01T11:11:11-06:00'.
What I would like is something that looks like '2007-01-01' and '2007-01-01T11:11:11Z', and for the time to not be converted to local time. This can be done either an item in the conf file or as a compile time symbol. Here is the code change I made:
In the serializer of both Date.cpp and DateTime.cpp I added:
#ifdef AXIS_USE_GMT
// new code to create GMT times
// basically it just appends a "Z" to the end of the date/datetime string
#else // AXIS_USE_GMT
// Calculate local timezone offset
#endif // AXIS_USE_GMT
In the deserializer I added
#ifndef AXIS_USE_GMT
// the t = labs (t - d) code inside the if statement where a Z is found on the end of the date
#endif // AXIS_USE_GMT
I then also added the -DAXIS_USE_GMT compile symbol to my VS project files.
I needed to make a change to both the serializer and deserializer. The serializer will now create date/datetimes in the format 'CCYY()MM()DDZ' and 'CCYY()MM()DDThh:mm:ssZ' respectively.