From kelley.dan at gmail.com  Sat May  9 00:31:22 2009
From: kelley.dan at gmail.com (Dan Kelley)
Date: Fri, 8 May 2009 15:31:22 -0700 (PDT)
Subject: [Rd] patch for axis.POSIXct (related to timezones)
In-Reply-To: <alpine.LFD.2.00.0903050746270.22802@gannet.stats.ox.ac.uk>
References: <22338700.post@talk.nabble.com>
	<alpine.LFD.2.00.0903050746270.22802@gannet.stats.ox.ac.uk>
Message-ID: <23454737.post@talk.nabble.com>


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)




-- 
View this message in context: http://www.nabble.com/patch-for-axis.POSIXct-%28related-to-timezones%29-tp22338700p23454737.html
Sent from the R devel mailing list archive at Nabble.com.



[Rd] patch for axis.POSIXct (related to timezones)
Dan Kelley