date & datetime fields need to be able to support GMT/UTC time
--------------------------------------------------------------

                 Key: AXISCPP-1058
                 URL: https://issues.apache.org/jira/browse/AXISCPP-1058
             Project: Axis-C++
          Issue Type: New Feature
          Components: XSD Types
         Environment: Client, Axis-C++, Xerces, Windows XP SP3, VS6
            Reporter: Ryan McCullough
             Fix For: current (nightly)


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.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to