axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sen...@apache.org
Subject svn commit: r635960 - in /webservices/axis2/trunk/c/util: include/axutil_date_time.h src/date_time.c
Date Tue, 11 Mar 2008 15:00:54 GMT
Author: senaka
Date: Tue Mar 11 08:00:47 2008
New Revision: 635960

URL: http://svn.apache.org/viewvc?rev=635960&view=rev
Log:
Improving UTC support

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=635960&r1=635959&r2=635960&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/include/axutil_date_time.h (original)
+++ webservices/axis2/trunk/c/util/include/axutil_date_time.h Tue Mar 11 08:00:47 2008
@@ -327,6 +327,11 @@
         axutil_date_time_t * date_time,
         const axutil_env_t * env);
 
+    AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+    axutil_date_time_is_utc(
+        axutil_date_time_t * date_time,
+        const axutil_env_t * env);
+
 #ifdef __cplusplus
 }
 #endif

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=635960&r1=635959&r2=635960&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/date_time.c (original)
+++ webservices/axis2/trunk/c/util/src/date_time.c Tue Mar 11 08:00:47 2008
@@ -781,6 +781,11 @@
 
     AXIS2_ENV_CHECK(env, NULL);
 
+    if (!date_time->tz_hour && !date_time->tz_min)
+    {
+        return axutil_date_time_serialize_time(date_time, env);
+    }
+
     time_str =
         (axis2_char_t *) AXIS2_MALLOC(env->allocator,
                                       sizeof(axis2_char_t) * 37);
@@ -851,6 +856,11 @@
 
     AXIS2_ENV_CHECK(env, NULL);
 
+    if (!date_time->tz_hour && !date_time->tz_min)
+    {
+        return axutil_date_time_serialize_date_time(date_time, env);
+    }
+
     date_time_str = AXIS2_MALLOC(env->allocator, sizeof(char) * 37);
     if (date_time->msec)
     {
@@ -948,6 +958,19 @@
     const axutil_env_t * env)
 {
     return (date_time->tz_pos);
+}
+
+AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+axutil_date_time_is_utc(
+    axutil_date_time_t * date_time,
+    const axutil_env_t * env)
+{
+    axis2_bool_t is_utc = AXIS2_TRUE;
+    if (date_time->tz_hour || date_time->tz_min)
+    {
+        is_utc = AXIS2_FALSE;
+    }
+    return is_utc;
 }
 
 AXIS2_EXTERN axutil_date_time_t *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