axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sen...@apache.org
Subject svn commit: r632983 - /webservices/axis2/trunk/c/util/src/date_time.c
Date Mon, 03 Mar 2008 08:49:09 GMT
Author: senaka
Date: Mon Mar  3 00:49:09 2008
New Revision: 632983

URL: http://svn.apache.org/viewvc?rev=632983&view=rev
Log:
Fixing JIRA Issue AXIS2C-1013

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?rev=632983&r1=632982&r2=632983&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/date_time.c (original)
+++ webservices/axis2/trunk/c/util/src/date_time.c Mon Mar  3 00:49:09 2008
@@ -115,6 +115,7 @@
     sscanf(date_str, "%d-%d-%d", &date_time->year, &date_time->mon,
            &date_time->day);
     date_time->year -= 1900;
+    date_time->year -= 1;
     return AXIS2_SUCCESS;
 }
 
@@ -130,6 +131,7 @@
            &date_time->mon, &date_time->day, &date_time->hour, &date_time->min,
            &date_time->sec, &date_time->msec);
     date_time->year -= 1900;
+    date_time->mon -= 1;
     return AXIS2_SUCCESS;
 }
 
@@ -225,9 +227,9 @@
 
     if (year > -1)
         date_time->year = year - 1900;
-    if (month > -1)
-        date_time->mon = month;
-    if (day > -1)
+    if (month > 0)
+        date_time->mon = month - 1;
+    if (day > 0)
         date_time->day = day;
     if (hour > -1)
         date_time->hour = hour;
@@ -272,7 +274,7 @@
         (axis2_char_t *) AXIS2_MALLOC(env->allocator,
                                       sizeof(axis2_char_t) * 32);
 
-    sprintf(date_str, "%d-%d-%d", date_time->year + 1900, date_time->mon,
+    sprintf(date_str, "%d-%d-%d", date_time->year + 1900, date_time->mon + 1,
             date_time->day);
     return date_str;
 }
@@ -307,7 +309,7 @@
     axutil_date_time_t * date_time,
     const axutil_env_t * env)
 {
-    return (date_time->mon);
+    return (date_time->mon + 1);
 }
 
 AXIS2_EXTERN int AXIS2_CALL



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


Mime
View raw message