Changeset 20363

Show
Ignore:
Timestamp:
02/06/09 12:31:25 (1 year ago)
Author:
piotras
Message:

Follow GDA timestamp to string conversion.
Midgard_timestamp should implementation should be removed in a future. refs #54

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/midgard/core/midgard/src/midgard_timestamp.c

    r20352 r20363  
    331331        MidgardTimestamp *mt = (MidgardTimestamp *) g_value_get_boxed(dst); 
    332332 
    333         if(mt == NULL) 
     333        if(mt == NULL) { 
     334                 
    334335                mt = midgard_timestamp_new(); 
    335  
    336         if (caltime_scan(time, mt) > 0) { 
    337  
     336                g_value_take_boxed(dst, mt); 
     337        }        
     338 
     339        /* GDA seems to convert datetime better. Follow its value. */ 
     340 
     341        GValue gt = {0, }; 
     342        g_value_init(&gt, GDA_TYPE_TIMESTAMP); 
     343        g_value_transform(src, &gt); 
     344 
     345        g_value_transform(&gt, dst); 
     346        g_value_unset(&gt); 
     347 
     348        /*if (caltime_scan(time, mt) > 0) { 
     349 
     350                g_warning("set"); 
    338351                midgard_timestamp_set(mt); 
    339352 
    340353        } else { 
    341354 
     355                g_warning("reset"); 
    342356                __timestamp_reset(dst); 
    343         } 
    344  
    345         if(mt == NULL) 
    346                 g_value_take_boxed(dst, mt); 
     357        }*/ 
     358 
    347359} 
    348360