From c89650ee882184e4e9285ce0c596bf6a4cfe2c28 Mon Sep 17 00:00:00 2001 From: Karsten Loesing Date: Wed, 20 Jan 2010 16:11:01 +0100 Subject: [PATCH] Write Last updated times in UTC. --- R/bridge-stats.R | 5 ++++- R/consensus-stats.R | 4 ++-- R/dirreq-stats.R | 6 ++++-- R/torperf.R | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/R/bridge-stats.R b/R/bridge-stats.R index 3584df1..3ff01e5 100644 --- a/R/bridge-stats.R +++ b/R/bridge-stats.R @@ -29,7 +29,10 @@ plot_bridges <- function(country, people, filename, color) { monthat <- c(monthat, (monthticks[i] + monthticks[i + 1]) / 2) png(filename, width=600, height=400) par(mar = c(4.1, 3.9, 2.1, 0)) - plot(data, ylim=c(0, max(na.omit(data))), type="l", col=color, lwd=2, axes=FALSE, frame=FALSE, main=paste(people, "Tor users via bridges"), xlab=paste("Last updated:", date()), ylab="") + plot(data, ylim=c(0, max(na.omit(data))), type="l", col=color, lwd=2, + axes=FALSE, frame=FALSE, + main=paste(people, "Tor users via bridges"), + xlab=paste("Last updated:", as.POSIXlt(Sys.time(), "UTC")), ylab="") axis(1, at=monthticks - 0.5, labels=FALSE, lwd=0, lwd.ticks=1) axis(1, at=c(1, length(data)), labels=FALSE, lwd=1, lwd.ticks=0) axis(1, at=monthat, lwd=0, labels=monthlabels) diff --git a/R/consensus-stats.R b/R/consensus-stats.R index e5bae54..b7dd236 100644 --- a/R/consensus-stats.R +++ b/R/consensus-stats.R @@ -38,7 +38,7 @@ exitCol <- "darkgreen" plot(runningNum, ylim=c(0, max(na.omit(runningNum))), type="l", col=runningCol, lwd=2, axes=FALSE, frame=FALSE, main=paste("Number of exit relays"), - xlab=paste("Last updated:", date()), ylab="") + xlab=paste("Last updated:", as.POSIXlt(Sys.time(), "UTC")), ylab="") lines(exitNum, col=exitCol, lwd=2) mtext("All relays", side=4, line=0, las=1, at=tail(na.omit(runningNum), n=1), col=runningCol) @@ -59,7 +59,7 @@ brunningCol <- "blue" plot(runningNum, ylim=c(0, max(na.omit(runningNum))), type="l", col=runningCol, lwd=2, axes=FALSE, frame=FALSE, main=paste("Number of relays and bridges"), - xlab=paste("Last updated:", date()), ylab="") + xlab=paste("Last updated:", as.POSIXlt(Sys.time(), "UTC")), ylab="") lines(brunningNum, col=brunningCol, lwd=2) mtext("Relays", side=4, line=0, las=1, at=tail(na.omit(runningNum), n=1), col=runningCol) diff --git a/R/dirreq-stats.R b/R/dirreq-stats.R index 914ac30..5ad371c 100644 --- a/R/dirreq-stats.R +++ b/R/dirreq-stats.R @@ -29,7 +29,8 @@ plot_moria1 <- function(country, people, filename, color) { png(filename, width=600, height=400) par(mar = c(4.1, 3.9, 2.1, 0)) plot(data, ylim=c(0, max(0, na.omit(data))), type="l", col=color, lwd=2, - axes=FALSE, frame=FALSE, xlab=paste("Last updated:", date()), + axes=FALSE, frame=FALSE, xlab=paste("Last updated:", + as.POSIXlt(Sys.time(), "UTC")), ylab="", main=paste("New or returning, directly connecting", people, "Tor users")) axis(1, at=monthticks - 0.5, labels=FALSE, lwd=0, lwd.ticks=1) @@ -82,7 +83,8 @@ plot_trusted <- function(country, people, filename, color) { png(filename, width=600, height=400) par(mar = c(4.1, 3.9, 2.1, 0)) plot(data, ylim=c(0, max(0, na.omit(data))), type="l", col=color, lwd=2, - axes=FALSE, frame=FALSE, xlab=paste("Last updated:", date()), + axes=FALSE, frame=FALSE, xlab=paste("Last updated:", + as.POSIXlt(Sys.time(), "UTC")), ylab="", main=paste("Recurring, directly connecting", people, "Tor users")) axis(1, at=monthticks - 0.5, labels=FALSE, lwd=0, lwd.ticks=1) diff --git a/R/torperf.R b/R/torperf.R index e17048c..2af01ae 100644 --- a/R/torperf.R +++ b/R/torperf.R @@ -65,7 +65,7 @@ for (intervalInd in 1:length(intervals)) { title <- paste("Time in seconds to complete", sizePr, "request") xlab <- "" if (sourceInd == length(sources)) - xlab <- paste("Last updated:", date()) + xlab <- paste("Last updated:", as.POSIXlt(Sys.time(), "UTC")) data <- subset(t, source %in% sourceStr)