[R] setting timezone variable permanently...

akshay kulkarni @k@h@y_e4 @end|ng |rom hotm@||@com
Wed Dec 7 18:19:40 CET 2022

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,

From: Jeff Newmiller <jdnewmil using dcn.davis.ca.us>
Sent: Wednesday, December 7, 2022 10:44 PM
To: r-help using r-project.org <r-help using r-project.org>; akshay kulkarni <akshay_e4 using hotmail.com>; R help Mailing list <r-help using 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 using 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,
>       [[alternative HTML version deleted]]
>R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>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.

	[[alternative HTML version deleted]]

More information about the R-help mailing list