Hello all,
I'm struggling with POSIXt objects.  I've read the refman, the Rnews from 2001 
and hopefully all the pertinent help pages.
I'm running windows xp.  
It appears my time zone variable isn't set, which hopefully is fine for this 
exercise.
> Sys.getenv("TZ")
TZ 
"" 
help(as.POSIXct) states:
"Dates without times are treated as being at midnight UTC."

If I create a POSIXct without time, I get TZ:PDT (which is what my OS is set 
at). Perhaps somebody could correct me, but I think this happens because the 
default argument TZ="" means use local TZ.

> format(as.POSIXct("2011-09-25"),"%x %X %Z")
[1] "25/09/2011 12:00:00 AM PDT"

Based on those results would it be more accurate to say:
"Dates without times are treated as being at midnight of the specified TZ." 
(i.e. if TZ="", then local TZ is used.)
thanks
Michael

_______________________________________________________
Michael Folkes
Salmon Stock Assessment
Canadian Dept. of Fisheries & Oceans     
Pacific Biological Station
3190 Hammond Bay Rd.
Nanaimo, B.C., Canada
V9T-6N7
Ph (250) 756-7264 Fax (250) 756-7053  michael.fol...@dfo-mpo.gc.ca


        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to