Re: [R] date time problem

2014-12-08 Thread Jeff Newmiller
You are still posting in HTML, and it is continuing to impede this conversation. Learn how to post in plain text before posting again. Gmail does have this option. You are not using dput, as previously asked, either. Read the web page I referenced to learn how to send R data unambiguously. Y

Re: [R] date time problem

2014-12-07 Thread Alemu Tadesse
Thank you very much Jeff. Below is the data I used: > Corrected_data SA_LST SA_GHI_mean 61759 3/11/2007 1:00 0.0 67517 3/11/2007 2:00 0.0 70017 3/11/2007 3:00 0.0 70524 3/11/2007 4:00 0.0 71061 3/11/2007 5:00 0.0 71638 3/11/2007 6:00 0.0

Re: [R] date time problem

2014-12-07 Thread Jeff Newmiller
You have not provided a reproducible example, so anything I say could be wrong just due to misinterpretation. Please read [1] for suggestions on making your examples reproducible, particularly regarding the use of dput to provide example data. You have also posted in HTML format, which can caus

Re: [R] date time problem

2014-12-07 Thread jim holtman
I would use the 'lubridate' package for this: > z <- Sys.time() > z [1] "2014-12-07 15:43:50 EST" > require(lubridate) > with_tz(z, "UTC") [1] "2014-12-07 20:43:50 UTC" Jim Holtman Data Munger Guru What is the problem that you are trying to solve? Tell me what you want

[R] date time problem

2014-12-07 Thread Alemu Tadesse
Dear R users I am puzzled by the following result from R script. I am trying to convert local time to UTC time. Time zone is -5, therefore I used the following approach. Below is the script. > Corrected_SA_data$date_time[k-1] [1] "2007-03-11 01:00:00" > Corrected_SA_data$TZ[k-1] [1] -5 > Correcte