From 2173c0cafdae14ca33ccd45138a5f0330f227e5e Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Tue, 22 Jun 2010 22:34:38 -0400 Subject: [PATCH] time.unix: add timestamp>timezone word --- extra/time/unix/unix.factor | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/extra/time/unix/unix.factor b/extra/time/unix/unix.factor index ba1bc6e3fb..d4bd45aeae 100644 --- a/extra/time/unix/unix.factor +++ b/extra/time/unix/unix.factor @@ -1,8 +1,12 @@ ! Copyright (C) 2010 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. -USING: calendar kernel math system time unix unix.time ; +USING: accessors calendar classes.struct kernel math system time +unix unix.time ; IN: time.unix +: timestamp>timezone ( timestamp -- timezone ) + gmt-offset>> duration>minutes 1 \ timezone ; inline + M: unix set-time [ unix-1970 time- duration>microseconds >integer make-timeval ] [ timestamp>timezone ] bi