You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by se...@apache.org on 2008/03/10 23:14:32 UTC
svn commit: r635726 - in /webservices/axis2/trunk/c/util:
include/axutil_date_time.h src/date_time.c
Author: senaka
Date: Mon Mar 10 15:14:30 2008
New Revision: 635726
URL: http://svn.apache.org/viewvc?rev=635726&view=rev
Log:
Fixing some typos and bugs in logic
Modified:
webservices/axis2/trunk/c/util/include/axutil_date_time.h
webservices/axis2/trunk/c/util/src/date_time.c
Modified: webservices/axis2/trunk/c/util/include/axutil_date_time.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/axutil_date_time.h?rev=635726&r1=635725&r2=635726&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/include/axutil_date_time.h (original)
+++ webservices/axis2/trunk/c/util/include/axutil_date_time.h Mon Mar 10 15:14:30 2008
@@ -271,7 +271,7 @@
AXIS2_EXTERN axutil_date_time_t *AXIS2_CALL
axutil_date_time_utc_to_local(
- axutil_date_time_t * date_time_in,
+ axutil_date_time_t * date_time,
const axutil_env_t * env,
axis2_bool_t is_positive,
int hour,
@@ -279,7 +279,7 @@
AXIS2_EXTERN axutil_date_time_t *AXIS2_CALL
axutil_date_time_local_to_utc(
- axutil_date_time_t * date_time_in,
+ axutil_date_time_t * date_time,
const axutil_env_t * env);
AXIS2_EXTERN int AXIS2_CALL
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=635726&r1=635725&r2=635726&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/date_time.c (original)
+++ webservices/axis2/trunk/c/util/src/date_time.c Mon Mar 10 15:14:30 2008
@@ -899,25 +899,45 @@
mon++;
day--;
- while (day > 30)
+ while (day > 27)
{
- mon++;
if (mon == 2)
{
- day -= 28;
if (year % 4 != 0 || year % 400 == 0)
{
- day--;
+ day -= 28;
+ mon++;
+ }
+ else if (day > 28)
+ {
+ day -= 29;
+ mon++;
+ }
+ else
+ {
+ break;
}
}
- if (mon == 4 || mon == 6 ||
- mon == 9 || mon == 11)
+ else if (day > 29)
{
- day -= 30;
+ if (mon == 4 || mon == 6 ||
+ mon == 9 || mon == 11)
+ {
+ day -= 30;
+ }
+ else if (day > 30)
+ {
+ day -= 31;
+ }
+ else
+ {
+ break;
+ }
+ mon++;
}
else
{
- day -= 31;
+ break;
}
if (mon > 12)
{
@@ -927,11 +947,10 @@
}
while (day < 0)
{
- mon--;
if (mon == 3)
{
day += 28;
- if (year % 4 != 0 || year % 400 == 0)
+ if (year % 4 == 0 || year % 400 != 0)
{
day++;
}
@@ -945,6 +964,7 @@
{
day += 31;
}
+ mon--;
if (mon < 1)
{
mon = 12;
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org