Branch: Tag:

2018-01-12

2018-01-12 13:39:24 by Stephen R. van den Berg <srb@cuci.nl>

Val.Timestamp: Trying to be too clever with rounding. The defaults were sane.

377:    case "float":    return nsecs / NANOSECONDS.0;    case "int": -  return (nsecs - (nsecs < 0 ? NANOSECONDS - 1 : 0)) / NANOSECONDS; +  return nsecs / NANOSECONDS;    default:    return UNDEFINED;    }
866:    create(mktime(tm + (["isdst":0, "timezone":0])));    }    variant protected void create(int unix_time) { -  days = (unix_time - (unix_time < 0 ? 24 * 3600 -1 : 0)) / (24 * 3600); +  days = unix_time / (24 * 3600);    }    variant protected void create(float unix_time) {    create((int)unix_time);