As I said, the tz is linked to your data, not where you OR your compute server
are, so setting TZ in your R code or specifying it as the tz argument when you
convert it are the best options.
If you choose to use your OS to set it that is up to you... but your code should
not depend on that setting either way.
On December 7, 2022 9:19:40 AM PST, akshay kulkarni <akshay_e4 at
hotmail.com> wrote:>dear Jeff,
> THanks for your reply. Would you not recommend this
solution too :
https://stackoverflow.com/questions/49738564/r-set-environment-variable-permanently
?
>
>THanking you,
>Yours sincerely,
>AKSHAY M KULKARNI
>
>________________________________
>From: Jeff Newmiller <jdnewmil at dcn.davis.ca.us>
>Sent: Wednesday, December 7, 2022 10:44 PM
>To: r-help at r-project.org <r-help at r-project.org>; akshay kulkarni
<akshay_e4 at hotmail.com>; R help Mailing list <r-help at
r-project.org>
>Subject: Re: [R] setting timezone variable permanently...
>
>Technically this is a question regarding your operating system, since
environment variables are propagated by the OS creation of processes and
different OSes include different mechanisms for configuring them.
>
>However, for practical purposes in R you can just put that statement into
your .Rprofile file.
>
>I would not recommend it though... rather you should include this statement
in every script that depends on this assumption. Otherwise your script will have
a hidden configuration dependency. In fact the timezone you set should be linked
with the data files you are using... if you work with time data from different
places then you should set it appropriately for that data at the point in your
script where you do the import.
>
>On December 7, 2022 8:47:20 AM PST, akshay kulkarni <akshay_e4 at
hotmail.com> wrote:
>>Dear members,
>> I am setting the Time zone environment
variable by this code:
>>
>>> Sys.setenv(TZ = "Asia/Kolkata")
>>
>>But I have to run it every time I open a new R session. How do I set it
permanently?
>>
>>Thanking you,
>>Yours sincerely,
>>AKSHAY M KULKARNI
>>
>> [[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.
>
>--
>Sent from my phone. Please excuse my brevity.
--
Sent from my phone. Please excuse my brevity.