dummy (unix time based) implementation of attr <-> time_t conversions
authorAleš Křenek <ljocha@ics.muni.cz>
Thu, 13 Oct 2005 13:50:30 +0000 (13:50 +0000)
committerAleš Křenek <ljocha@ics.muni.cz>
Thu, 13 Oct 2005 13:50:30 +0000 (13:50 +0000)
org.glite.jp.common/src/attr.c

index 98f8ea4..b50efac 100644 (file)
@@ -199,13 +199,21 @@ const char *glite_jp_attrval_db_type_index(glite_jp_context_t ctx,const char *at
        return ap->db_type_index(ap->pctx,attr,len);
 }
 
+/* XXX: UNIX time, should be ISO blahblah */
 time_t glite_jp_attr2time(const char *a)
 {
-       abort();
+       long    t;
+
+       sscanf(a,"%ld",&t);
+       return t;
 }
 
+/* XXX: UNIX time, should be ISO blahblah */
 char * glite_jp_time2attr(time_t t)
 {
-       abort();
+       char    *r;
+
+       trio_asprintf(&r,"%ld",(long) t);
+       return r;
 }