time.unix: add timestamp>timezone word
							parent
							
								
									83327635f3
								
							
						
					
					
						commit
						2173c0cafd
					
				| 
						 | 
					@ -1,8 +1,12 @@
 | 
				
			||||||
! Copyright (C) 2010 Doug Coleman.
 | 
					! Copyright (C) 2010 Doug Coleman.
 | 
				
			||||||
! See http://factorcode.org/license.txt for BSD license.
 | 
					! 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
 | 
					IN: time.unix
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					: timestamp>timezone ( timestamp -- timezone )
 | 
				
			||||||
 | 
					    gmt-offset>> duration>minutes 1 \ timezone <struct-boa> ; inline
 | 
				
			||||||
 | 
					
 | 
				
			||||||
M: unix set-time
 | 
					M: unix set-time
 | 
				
			||||||
    [ unix-1970 time- duration>microseconds >integer make-timeval ]
 | 
					    [ unix-1970 time- duration>microseconds >integer make-timeval ]
 | 
				
			||||||
    [ timestamp>timezone ] bi
 | 
					    [ timestamp>timezone ] bi
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue