]> gitweb.factorcode.org Git - factor.git/commitdiff
Implement gmt hook on unix
authorDoug Coleman <doug.coleman@gmail.com>
Thu, 17 Jun 2010 05:04:53 +0000 (00:04 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Thu, 17 Jun 2010 05:04:53 +0000 (00:04 -0500)
basis/calendar/unix/unix.factor

index 6916129368a023fbfbf1e375f9dd57b6413f688a..40475b4d407ef53cbbc3da1d0f9b617de9926001 100644 (file)
@@ -28,3 +28,7 @@ IN: calendar.unix
 
 M: unix gmt-offset ( -- hours minutes seconds )
     get-time gmtoff>> 3600 /mod 60 /mod ;
+
+M: unix gmt
+    timeval <struct> f [ gettimeofday io-error ] 2keep drop
+    timeval>unix-time ;