Re: [R] timestamp shifted by hour(s) while mering zoo objects

2010-03-07 Thread Keith
Thanks Gabor, Just one comment on the error you received on the Vista machine. I also noticed this problem on Windows as well, and found there is no specification of "GMT+1" on Windows XP. The closest setting for "GMT+1" on windows is "Africa/Lagos", however there is no this problem on *unix

Re: [R] timestamp shifted by hour(s) while mering zoo objects

2010-03-07 Thread Gabor Grothendieck
On my Vista system I get an error message saying that there is no such timezone as GMT+1. You may be better off not using time zones and just adjusting the times yourself. You could just use chron and avoid the entire time zone problem in the first place. In the first of the two approaches below

Re: [R] timestamp shifted by hour(s) while mering zoo objects

2010-03-07 Thread CHI-YU
Thanks Gabor, You're right. The problem comes from the environment variable TZ. I just tried the Sys.getenv("TZ") and it's nothing there. After I have set the environment variable TZ as the same as the data, let's say Sys.setenv(TZ="GMT+1"), the problem is gone. In order to complete the prob

Re: [R] timestamp shifted by hour(s) while mering zoo objects

2010-03-07 Thread Gabor Grothendieck
Without reproducible code (that means we can copy your code from your post, paste it into our session and see the same problem that you see) there is not much that can be said that addresses your specific situation but in terms of general advice: - the inappropriate use of time zones is a frequent

[R] timestamp shifted by hour(s) while mering zoo objects

2010-03-07 Thread Keith
Dear R-users, I have two regular hourly time series data which were recorded in time zone GMT+1, and now I would like to merge them together for further analyses. Here I used zoo and merge.zoo for my purposes and everything worked fine except the timestamp shifted 2 hours after merging which