[R] Convert time zone to difference from Coordinated Universal Time

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Sep 4 08:54:07 CEST 2014


On 04/09/2014 02:27, Tim.Williams at ucb.com wrote:
> Hello everyone,
>
> I want to convert times provided by Sys.time()  to use  the difference from Coordinated Universal Time instead of the character abbreviation.
>
> For example, instead of:
> 2014-09-03 21:12:35 EDT
>
> I want the value as:
> 2004-09-03 13:20:00-04:00
>
> Is there a way to do this with strftime() ?

On some systems.  Although the posting guide required it, you did not 
provide information on yours.

Please do read the help page for yourself -- %z is relevant.


>
> Thanks in advance,
>
> Tim
>
> ________________________________
> UCB BIOSCIENCES, Inc.
> Mail P.O. Box 110167 - Research Triangle Park - NC 27709 - USA
> Via Courier 8010 Arco Corporate Drive - Suite 100 - Raleigh - NC 27617 - USA
> Phone +1 919 767 2555 - Fax +1 919 767 2570
>
> (Ref: #*UBI0111) [Ref-UBI0111]
> ________________________________
> Legal Notice: This electronic mail and its attachments a...{{dropped:16}}
>
> ______________________________________________
> R-help at r-project.org mailing list
> 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.
>


-- 
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



More information about the R-help mailing list