1 ! Copyright (C) 2010 Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors calendar classes.struct kernel libc math
4 system time unix unix.time ;
7 : timestamp>timezone ( timestamp -- timezone )
8 gmt-offset>> duration>minutes 1 \ timezone boa ; inline
10 M: unix set-system-time
11 [ unix-1970 time- duration>microseconds >integer make-timeval ]
12 [ timestamp>timezone ] bi
13 settimeofday io-error ;