From p.dalgaard@biostat.ku.dk  Wed May  1 17:53:44 2002
From: p.dalgaard@biostat.ku.dk (Peter Dalgaard BSA)
Date: 01 May 2002 18:53:44 +0200
Subject: [Rd] converting #sec to POSIX* format
In-Reply-To: <D7E178FC91F3D21186A90008C7B9A5B810080FD9@ntexchange09.micron.com>
References: <D7E178FC91F3D21186A90008C7B9A5B810080FD9@ntexchange09.micron.com>
Message-ID: <x24rhrn71j.fsf@blueberry.kubism.ku.dk>

lsjensen <lsjensen@micron.com> writes:

> Sure I'm missing something simple here, but I haven't been able to find a
> easy way to convert a pure numeric (# of seconds since the beginning of
> 1970) back into a POSIX* object. 
> 
> ex.
> > z<-as.POSIXct(Sys.time()) 
> > z
> [1] "2002-05-01 10:33:56 Mountain Daylight Time"
> > x<-unclass(z)
> > x
> [1] 1020270836
> 
> Is there a simple way to transform x back into a POSIX* object similar to z?

> 1020270836 + ISOdate(1970,1,1,0,0)
[1] "2002-05-01 18:33:56 CEST"


-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] converting #sec to POSIX* format
Peter Dalgaard BSA