From: Aleš Křenek Date: Thu, 13 Oct 2005 13:50:30 +0000 (+0000) Subject: dummy (unix time based) implementation of attr <-> time_t conversions X-Git-Tag: glite-jp-client_R_1_0_0~63 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=8287e8b453fa70639736081bb6f359f55d13745e;p=jra1mw.git dummy (unix time based) implementation of attr <-> time_t conversions --- diff --git a/org.glite.jp.common/src/attr.c b/org.glite.jp.common/src/attr.c index 98f8ea4..b50efac 100644 --- a/org.glite.jp.common/src/attr.c +++ b/org.glite.jp.common/src/attr.c @@ -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; }