[Rd] bug in axis.POSIXct relating to tz (PR#13696)

kelley.dan at gmail.com kelley.dan at gmail.com
Tue May 12 11:55:12 CEST 2009


Full_Name: Dan Kelley
Version: 2.8.0
OS: OS X
Submission from: (NULL) (142.177.154.193)


Some time ago, I posted a note about what I considered to be a bug in
axis.POSIXt() for R 2.8.x, relating to whether timezones in the data are obeyed
on the axes.  A link to that note, and to a quick and helpful response, is at
the following URL 

http://www.nabble.com/patch-for-axis.POSIXct-%28related-to-timezones%29-td22338700.html#a22338700

Note that R 2.9.0 has been adjusted to help with this.  However, there are still
problems.  Test code is given below:

<pre>
# test code (top panel, OK; bottom panel, incorrect times on x axis) 
par(mar=c(2,2,2,1)) 
par(mfrow=c(2,1)) 
start <- as.POSIXct("2008-05-01 00:00:00", tz="UTC") 
end   <- as.POSIXct("2008-05-01 00:10:00", tz="UTC") 
plot(c(start, end), c(0, 1), ylab="") 
mtext(paste(start, "to", end), side=3) 

start <- as.POSIXct("2008-05-01 00:00:00", tz="UTC") 
end   <- as.POSIXct("2008-05-01 01:10:00", tz="UTC") 
plot(c(start, end), c(0, 1), ylab="") 
mtext(paste(start, "to", end), side=3)
</pre>



More information about the R-devel mailing list