2017-10-19 57 views

回答

3
> difftime(Sys.time(),as.POSIXct("1970-01-01 00:00:00 GMT"),units = "secs") 
Time difference of 1508429337 secs 

或者作为d.b正确地指出,如果只想相对于原点的差异,as.numeric(Sys.time())

+0

非常感谢您! –

+1

考虑将此答案标记为接受,如果这回答你的问题。 –

+2

对于原产地,您应该可以只使用'as.numeric(Sys.time())' –