I have these lines of an R-script:
date1999 = as.POSIXlt("1999-01-01", tz = "Etc/GMT-1")
date2001 = as.POSIXlt("2001-01-01", tz = "Etc/GMT-1")
dates=c(date1999, date2001)
print(hours(dates)) # -> [1] 0 0
l=list(dates=dates)
print(hours(l$dates)) # -> [1] 0 0
d=as.data.frame(l)
print(hours(d$dates)) # -> [1] 23 23
I find this kind of weird and can't figure out why this happens (this doesn't occur when using Date instead of POSIXlt).
Can somebody explain this? Or comment on whether I do something strange in the Date definition? Thanks already!