Hi,
Let me know, how to set/unset "isdst" parameter in system/session
level.
I could understand the possible values of isdst 0, 1 and -1.
Example:
Sys.setenv(TZ="PST8PDT");
as.POSIXct("2007-11-04 01:00:00");
when I was executed the above command,
LINUX.X64 -> it was treated as PST value.
[1] "2007-11-04 01:00:00 PST"
WINDOWS.X64 -> it was treated as PDT value
[1] "2007-11-04 01:00:00 PDT"
SOLARIS.X64 -> it was treated as PST value.
[1] "2007-11-04 01:00:00 PST"
In 2007 the Daylight saving time was ended at 2007-11-04 02:00:00, so there
was two "2007-11-04 01:00:00" values each for Standard and Daylight
time.
But I was not able to understand, how R is displaying the datetime as
PST/PDT.
Please do the needful.
Thanks
Vasanth
[[alternative HTML version deleted]]
On 19/01/2015 11:51, Vasantha Kumar Kesavan wrote:> Hi, > > Let me know, how to set/unset "isdst" parameter in system/session level. > > I could understand the possible values of isdst 0, 1 and -1. > > Example: > > Sys.setenv(TZ="PST8PDT"); > as.POSIXct("2007-11-04 01:00:00"); > > when I was executed the above command, > > LINUX.X64 -> it was treated as PST value. > [1] "2007-11-04 01:00:00 PST" > > WINDOWS.X64 -> it was treated as PDT value > [1] "2007-11-04 01:00:00 PDT" > > SOLARIS.X64 -> it was treated as PST value. > [1] "2007-11-04 01:00:00 PST" > > In 2007 the Daylight saving time was ended at 2007-11-04 02:00:00, so there > was two "2007-11-04 01:00:00" values each for Standard and Daylight time. > > But I was not able to understand, how R is displaying the datetime as > PST/PDT.?as.POSIXct says What happens in such cases is OS-specific: one should expect the first to be ?NA?, but the second could be interpreted as either BST or GMT (and common OSes give both possible values). and note you are unfairly blaming R for what OS services do.> > Please do the needful._You_ please 'do the needful' and read and follow the posting guide. We know you did not as you posted in HTML ....> > > Thanks > Vasanth > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.PLEASE do. -- Brian D. Ripley, ripley at stats.ox.ac.uk Emeritus Professor of Applied Statistics, University of Oxford 1 South Parks Road, Oxford OX1 3TG, UK
1) Read the help file
?timezones
and note that the R project does not do any of the programming associated with
that functionality.
2) Keep in mind that it is you who are supplying an indeterminate value to be
interpreted. You need to know from context (another column of data? The trend of
values preceding this value?) whether this value should be interpreted as DT or
ST. You would have to convert first to POSIXlt and fix the isdst value yourself
for those values that need your attention before converting to POSIXct.
3) Please read the posting guide and follow it, including posting in plain text
on this mailing list.
---------------------------------------------------------------------------
Jeff Newmiller The ..... ..... Go Live...
DCN:<jdnewmil at dcn.davis.ca.us> Basics: ##.#. ##.#. Live
Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with
/Software/Embedded Controllers) .OO#. .OO#. rocks...1k
---------------------------------------------------------------------------
Sent from my phone. Please excuse my brevity.
On January 19, 2015 3:51:39 AM PST, Vasantha Kumar Kesavan <info.vasukv at
gmail.com> wrote:>Hi,
>
>Let me know, how to set/unset "isdst" parameter in system/session
>level.
>
>I could understand the possible values of isdst 0, 1 and -1.
>
>Example:
>
>Sys.setenv(TZ="PST8PDT");
>as.POSIXct("2007-11-04 01:00:00");
>
>when I was executed the above command,
>
>LINUX.X64 -> it was treated as PST value.
>[1] "2007-11-04 01:00:00 PST"
>
>WINDOWS.X64 -> it was treated as PDT value
>[1] "2007-11-04 01:00:00 PDT"
>
>SOLARIS.X64 -> it was treated as PST value.
>[1] "2007-11-04 01:00:00 PST"
>
>In 2007 the Daylight saving time was ended at 2007-11-04 02:00:00, so
>there
>was two "2007-11-04 01:00:00" values each for Standard and
Daylight
>time.
>
>But I was not able to understand, how R is displaying the datetime as
>PST/PDT.
>
>Please do the needful.
>
>
>Thanks
>Vasanth
>
> [[alternative HTML version deleted]]
>
>______________________________________________
>R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.