Changeset: eb2292c14eae for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=eb2292c14eae
Modified Files:
monetdb5/modules/atoms/mtime.c
Branch: Jul2015
Log Message:
changed epoch(lng) to expect seconds not milli seconds
diffs (43 lines):
diff --git a/monetdb5/modules/atoms/mtime.c b/monetdb5/modules/atoms/mtime.c
--- a/monetdb5/modules/atoms/mtime.c
+++ b/monetdb5/modules/atoms/mtime.c
@@ -2651,13 +2651,13 @@ MTIMEepoch2int(int *ret, const timestamp
}
str
-MTIMEtimestamp(timestamp *ret, const int *sec)
+MTIMEtimestamplng(timestamp *ret, const lng *sec)
{
timestamp t;
lng l;
str e;
- if (*sec == int_nil) {
+ if (*sec == lng_nil) {
*ret = *timestamp_nil;
return MAL_SUCCEED;
}
@@ -2668,20 +2668,10 @@ MTIMEtimestamp(timestamp *ret, const int
}
str
-MTIMEtimestamplng(timestamp *ret, const lng *sec)
+MTIMEtimestamp(timestamp *ret, const int *sec)
{
- timestamp t;
- lng l;
- str e;
-
- if (*sec == lng_nil) {
- *ret = *timestamp_nil;
- return MAL_SUCCEED;
- }
- if ((e = MTIMEunix_epoch(&t)) != MAL_SUCCEED)
- return e;
- l = ((lng) *sec);
- return MTIMEtimestamp_add(ret, &t, &l);
+ const lng s = *sec;
+ return MTIMEtimestamplng(ret, &s);
}
str
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list