ref: 15606f51c9d822f324ac97f3fc174a4e79414f00
parent: bbb28d255caf1b890e4bd5dca79ae6f5d11a360c
author: Ori Bernstein <ori@eigenstate.org>
date: Thu Aug 28 11:12:06 EDT 2014
Keep the actual time and offset. All dates are canonically in microseconds since the Unix epoch.
--- a/lib/date/date.myr
+++ b/lib/date/date.myr
@@ -58,12 +58,12 @@
var t, e
var date
- /* apply time zone offset */
+ date.actual = tm
+ date.tzoff = off
tm += off castto(std.time)
t = tm % (24*60*60*1_000_000) /* time */
e = tm / (24*60*60*1_000_000) /* epoch days */
- date.actual = tm
/* microseconds, seconds, minutes, hours */
date.us = (t % 1_000_000) castto(int)