From 8287e8b453fa70639736081bb6f359f55d13745e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ale=C5=A1=20K=C5=99enek?= Date: Thu, 13 Oct 2005 13:50:30 +0000 Subject: [PATCH] dummy (unix time based) implementation of attr <-> time_t conversions --- org.glite.jp.common/src/attr.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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; } -- 1.8.2.3