Update of /cvsroot/monetdb/MonetDB5/src/modules/atoms
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv10466/src/modules/atoms
Modified Files:
Tag: MonetDB_5-4
mtime.mx
Log Message:
fix bugs in epoch
Index: mtime.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/modules/atoms/mtime.mx,v
retrieving revision 1.106.2.7
retrieving revision 1.106.2.8
diff -u -d -r1.106.2.7 -r1.106.2.8
--- mtime.mx 11 Feb 2008 21:41:00 -0000 1.106.2.7
+++ mtime.mx 12 Feb 2008 09:16:37 -0000 1.106.2.8
@@ -808,7 +808,7 @@
command timestamp(t:timestamp):timestamp address MTIMEtimestamp2timestamp;
command timestamp(d:date) :timestamp address MTIMEtimestamp_create_from_date;
command timestamp(secs:int):timestamp address MTIMEtimestamp;
-command timestamp(secs:lng):timestamp address MTIMEtimestamp_lng;
+command timestamp(msecs:lng):timestamp address MTIMEtimestamp_lng;
command daytime(s:str):daytime address MTIMEdaytime_fromstr;
command daytime(d:daytime):daytime address MTIMEdaytime2daytime;
@@ -1043,7 +1043,7 @@
mtime_export str MTIMEepoch(timestamp *ret);
mtime_export str MTIMEepoch2int(int *res, timestamp *ts);
mtime_export str MTIMEtimestamp(timestamp *ret, int *sec);
-mtime_export str MTIMEtimestamp_lng(timestamp *ret, lng *sec);
+mtime_export str MTIMEtimestamp_lng(timestamp *ret, lng *msecs);
mtime_export str MTIMEruleDef0(rule *ret, int *m, int *d, int *w, int *h, int
*mint);
mtime_export str MTIMEruleDef1(rule *ret, int *m, str *dnme, int *w, int *h,
int *mint);
mtime_export str MTIMEruleDef2(rule *ret, int *m, str *dnme, int *w, int
*mint);
@@ -3716,7 +3716,7 @@
MTIMEtimestamp(timestamp *ret, int *sec)
{
timestamp e;
- lng l = *sec * 1000;
+ lng l = ((lng) *sec) * 1000;
MTIMEunix_epoch(&e);
timestamp_add(ret, &e, &l);
@@ -3724,10 +3724,10 @@
}
str
-MTIMEtimestamp_lng(timestamp *ret, lng *sec)
+MTIMEtimestamp_lng(timestamp *ret, lng *msec)
{
timestamp e;
- lng l = *sec * 1000;
+ lng l = *msec;
MTIMEunix_epoch(&e);
timestamp_add(ret, &e, &l);
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins