TIme Zone error

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

TIme Zone error

Bogaso
Hi,

I want to set a specific Timezone for my R environment, with below syntax:

> Sys.getenv("Asia/Calcutta")

[1] ""

>
But it sets to some blank timezone.

I checked with OlsonNames(), to see available zones for R, where I found
"Asia/Calcutta" available.

I idea why R failed to set timezone properly?

Thanks for your time.

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: TIme Zone error

R help mailing list-2
> Sys.setenv(TZ="US/Eastern")
> as.POSIXlt("2019-01-26 01:19")
[1] "2019-01-26 01:19:00 EST"
> Sys.setenv(TZ="Asia/Calcutta")
> as.POSIXlt("2019-01-26 01:19")
[1] "2019-01-26 01:19:00 IST"

(Sys.getenv("Asia/Calcutta") returns the value of the environment variable
"Asia/Calcutta".  It does not set a value.)
Bill Dunlap
TIBCO Software
wdunlap tibco.com


On Sat, Jan 26, 2019 at 1:15 PM Christofer Bogaso <
[hidden email]> wrote:

> Hi,
>
> I want to set a specific Timezone for my R environment, with below syntax:
>
> > Sys.getenv("Asia/Calcutta")
>
> [1] ""
>
> >
> But it sets to some blank timezone.
>
> I checked with OlsonNames(), to see available zones for R, where I found
> "Asia/Calcutta" available.
>
> I idea why R failed to set timezone properly?
>
> Thanks for your time.
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] 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.
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: TIme Zone error

Jeff Newmiller
In reply to this post by Bogaso
Read the help file

?as.POSIXct

"" as time zone is not an error.

On January 26, 2019 1:15:21 PM PST, Christofer Bogaso <[hidden email]> wrote:

>Hi,
>
>I want to set a specific Timezone for my R environment, with below
>syntax:
>
>> Sys.getenv("Asia/Calcutta")
>
>[1] ""
>
>>
>But it sets to some blank timezone.
>
>I checked with OlsonNames(), to see available zones for R, where I
>found
>"Asia/Calcutta" available.
>
>I idea why R failed to set timezone properly?
>
>Thanks for your time.
>
> [[alternative HTML version deleted]]
>
>______________________________________________
>[hidden email] 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.

--
Sent from my phone. Please excuse my brevity.

______________________________________________
[hidden email] 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.