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
and I note that R 2.9.0 has been adjusted to help with this. However, there
are still problems. I do apologize for not having performed a test build
prior to the 2.9.0 release; this was partly because I find test builds
difficult on my OSX box, and partly because I have written replacement code
and mostly use that. But today I tried R 2.9.0, and the problem persists
... sometimes. Test code is given below. The top panel is correct, but the
bottom one is incorrect. The problem relates to the time interval.
# 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)