You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ka...@apache.org on 2006/10/18 16:32:28 UTC

svn commit: r465260 - /webservices/axis2/trunk/c/util/src/date_time.c

Author: kaushalye
Date: Wed Oct 18 07:32:27 2006
New Revision: 465260

URL: http://svn.apache.org/viewvc?view=rev&rev=465260
Log:
Changed the format of the date time deserialization. The timestamp should have values in two digits other than for the year component. i.e. If the month is january it should show 01 rather than 1.  e.g. 2006-01-08T12:01:31Z. 
Also the month starting value was 0(for January). This I changed to January=1, February=2... 

Modified:
    webservices/axis2/trunk/c/util/src/date_time.c

Modified: webservices/axis2/trunk/c/util/src/date_time.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/date_time.c?view=diff&rev=465260&r1=465259&r2=465260
==============================================================================
--- webservices/axis2/trunk/c/util/src/date_time.c (original)
+++ webservices/axis2/trunk/c/util/src/date_time.c Wed Oct 18 07:32:27 2006
@@ -319,9 +319,8 @@
     date_time_impl = AXIS2_INTF_TO_IMPL(date_time);
 
     date_time_str = AXIS2_MALLOC(env-> allocator, sizeof(char) * 32);
-
-    sprintf(date_time_str, "%d-%d-%dT%d:%d:%dZ" , date_time_impl-> year + 1900,
-            date_time_impl-> mon, date_time_impl-> day, date_time_impl-> hour, date_time_impl-> min,
+    sprintf(date_time_str, "%d-%02d-%02dT%02d:%02d:%02dZ" , date_time_impl-> year + 1900,
+            date_time_impl-> mon + 1, date_time_impl-> day, date_time_impl-> hour, date_time_impl-> min,
             date_time_impl-> sec);
     return date_time_str;
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org