git://scientific.zcu.cz
/
jra1mw.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fdde424
)
dummy (unix time based) implementation of attr <-> time_t conversions
author
Aleš Křenek
<ljocha@ics.muni.cz>
Thu, 13 Oct 2005 13:50:30 +0000
(13:50 +0000)
committer
Aleš Křenek
<ljocha@ics.muni.cz>
Thu, 13 Oct 2005 13:50:30 +0000
(13:50 +0000)
org.glite.jp.common/src/attr.c
patch
|
blob
|
blame
|
history
diff --git
a/org.glite.jp.common/src/attr.c
b/org.glite.jp.common/src/attr.c
index
98f8ea4
..
b50efac
100644
(file)
--- 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;
}