Re: [R] Timezone question

2023-08-17 Thread Bert Gunter
You may also find the package "lutz" to be of interest, although that may
be overkill for your needs.
(found by an internet search).

Cheers,
Bert


On Thu, Aug 17, 2023 at 1:31 PM Dennis Fisher  wrote:

> R 4.3.1
> OS X
>
> Colleagues
>
> Is there a simple way to determine the timezone offset for my present
> location.  For example, during standard time in the US, the offset from GMT
> is 8 hours in California.
>
> Dennis
>
> Dennis Fisher MD
> P < (The "P Less Than" Company)
> Phone / Fax: 1-866-PLessThan (1-866-753-7784)
> www.PLessThan.com 
>
>
>
>
>
> [[alternative HTML version deleted]]
>
> __
> R-help@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.
>

[[alternative HTML version deleted]]

__
R-help@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.


Re: [R] Timezone question

2023-08-17 Thread Marc Schwartz via R-help
Hi Dennis,

I believe that it may be as simple as:

> format(Sys.time(), "%z")
[1] "-0400"

Where "%z" returns the offset from UTC as a character vector, and where I am in:

> Sys.timezone()
[1] "America/New_York"

There may be some subtleties, and I would suggest reading the relevant help 
files for ?strptime and the above two functions.

Regards,

Marc Schwartz


-Original Message-
From: R-help mailto:r-help-boun...@r-project.org>> on behalf of Dennis Fisher 
mailto:fis...@plessthan.com>>
Date: Thursday, August 17, 2023 at 4:31 PM
To: mailto:r-help@r-project.org>>
Subject: [R] Timezone question


R 4.3.1
OS X


Colleagues


Is there a simple way to determine the timezone offset for my present location. 
For example, during standard time in the US, the offset from GMT is 8 hours in 
California.


Dennis


Dennis Fisher MD
P < (The "P Less Than" Company)
Phone / Fax: 1-866-PLessThan (1-866-753-7784)
www.PLessThan.com <http://www.plessthan.com/> <http://www.plessthan.com/;>

__
R-help@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.


[R] Timezone question

2023-08-17 Thread Dennis Fisher
R 4.3.1
OS X

Colleagues

Is there a simple way to determine the timezone offset for my present location. 
 For example, during standard time in the US, the offset from GMT is 8 hours in 
California.

Dennis

Dennis Fisher MD
P < (The "P Less Than" Company)
Phone / Fax: 1-866-PLessThan (1-866-753-7784)
www.PLessThan.com 





[[alternative HTML version deleted]]

__
R-help@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.