Skip to content

problem of "local" ! :-(

2 messages · Suresh_FSFM, Gabor Grothendieck

#
Dear R- Experts,

Seek your help.

I created a time sequence using:
x[i] <-chron(dates, tt, format=c(dates="y-m-d", tt="h:m:s"))
first element in the list is displayed as: (09-01-01 00:00:00) 

Now, I want to store this value as date.
If I use: format.Date(x[1],"%y-%m-%d %H:%M:%S"), I expect following value:
"09-01-01 00:00:00"

HOWEVER, the value displayed as: "09-01-01 01:00:00"

I want to create time sequence starting from 00:00:00 !!!

I realized that this is due to my "local" setting. I have GMT+1:00 setting.
However, I do not want my local settings to affect my time sequence.
Can someone please suggest me the solution?
Note: 
I do not want to change my local settings before I start R. Because that is
not practical.
#
The Date class does not work with times and neither it nor
the chron dates and times classes use time zones so
that cannot be the problem if you are using those classes.
Much of this is discussed in R News 4/1.
On Mon, Feb 16, 2009 at 4:05 PM, Suresh_FSFM <suresh.ghalsasi at gmail.com> wrote: