[R-sig-finance] Time zone convention of its package

stefan.albrecht at allianz.com stefan.albrecht at allianz.com
Fri Apr 15 15:56:16 CEST 2005






Dear all,

I use the its package for the representation of irregular time
objects. I think, it is really a great tool.

However, I have troubles with the time zone convention of its:
its(x,
dates=as.POSIXct(x=strptime(dimnames(x)[[1]],format=its.format()),tz="UTM"),

names=dimnames(x)[[2]],
format=its.format(),
...)

It uses tz = "UTM", which, first of all, I cannot relate to any
convention (what does it stand for?), and secondly, I feel it is not
very practical.
The help page of as.POSIX* {base} states that "Dates are treated as
being at midnight UTC."

Therefore, I suggest to use tz = "UTC" in its. (GMT and UTC are the
same.)

This avoids the following problem:
> (x <- matrix(1, nrow = 1, dimnames = list("2005-03-31", "Test")))
           Test
2005-03-31    1
> its(x)
           Test
2005-03-30    1
> as.POSIXct(x="2005-03-31",tz="GMT")
[1] "2005-03-31 GMT"
> as.POSIXct(x="2005-03-31",tz="UTM")
[1] "2005-03-30 23:00:00 UTM"
> as.POSIXct(x="2005-03-31",tz="foo")
[1] "2005-03-30 23:00:00 foo"

its(x) is shifted back one day. I guess this has something to do with
the daylight savings time.

In addition, some operations like union() seem to erase the tzone
argument of its objects. It is then added again in its, with a
possible shift of the day.

What do you think of using tz = "UTC" instead of "UTM"?


Many thanks and best regards,

Stefan

-------------------------------------------------------
Dr. Stefan Albrecht, CFA
Allianz Private Equity Partners GmbH
Giselastraße 4
D-80802 Munich, Germany
Phone: +49.89.38 00 - 18 317
Fax: +49.89.38 00 - 818 317
stefan.albrecht at allianz.com
www.apep.com
	[[alternative HTML version deleted]]



More information about the R-sig-finance mailing list