         swap >>nsec
         swap >>sec ;
 
+STRUCT: timezone
+    { tz_minuteswest int }
+    { tz_dsttime int } ;
+
+: timestamp>timezone ( timestamp -- timezone )
+    gmt-offset>> duration>minutes
+    1
+    \ timezone <struct-boa> ; inline
+
 STRUCT: tm
     { sec int }
     { min int }

! Copyright (C) 2008 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: kernel alien.syntax alien.c-types math unix.types
classes.struct accessors ;
IN: unix.time

STRUCT: timeval

FUNCTION: time_t time ( time_t* t ) ;
FUNCTION: tm* localtime ( time_t* clock ) ;
FUNCTION: int gettimeofday ( timespec* TP, void* TZP ) ;
FUNCTION: int settimeofday ( timeval* TP, timezone* TZP ) ;
FUNCTION: int adjtime ( timeval* delta, timeval* olddelta ) ;
