If you don't need POSIXt types, as Gabor says don't use them. However, there are good reasons to use them sometimes, and the most workable solution I have found is to set your default timezone in R to a non-DST timezone before you convert from character to POSIXct. This is dependent on your OS and particular build of R, but on Windows and Linux I have found that Sys.setenv(TZ="Etc/GMT-2") at the beginning of my R session should handle Central European Standard Time. To identify which time zones are supported on your system, read the documentation (there is generally a zoneinfo directory somewhere with filenames matching the time zones). --------------------------------------------------------------------------- Jeff Newmiller The ..... ..... Go Live... DCN:<jdnew...@dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/Batteries O.O#. #.O#. with /Software/Embedded Controllers) .OO#. .OO#. rocks...1k --------------------------------------------------------------------------- Sent from my phone. Please excuse my brevity.
B Laura <gm.spam2...@gmail.com> wrote: Dear Gabor http://rwiki.sciviews.org/doku.php?id=tips:data-io:ms_windows&s=excel doesnt describe handling dates with daylight saving time issues. R classes Date can remove time and timezone, however calculating days difference between two manipulated variables same problem appear if handling these without Dates. R News 4/1 doesnt provide solution to this neither. Have read and struggled with this stuff for 3 days. Anyone else who could help on this? Regards,Laura. 2011/7/12 Gabor Grothendieck <ggrothendi...@gmail.com> > On Tue, Jul 12, 2011 at 6:58 AM, B Laura <gm.spam2...@gmail.com> wrote: > > Hello all, > > > > Could someone help me with the time zones in understandable & practical > way? > > I got completely stucked with this. > > > > Have googled for a while and read the manuals, but without solutions... > > > > > > > >_____________________________________________ > > > > When data imported from Excel 2007 into R (2.13) > > > > all time variables, depending on date (summer or winter) get (un-asked > for > > it!) a time zone addition CEST (for summer dates) or CET (for winter > dates). > > > > Read > http://rwiki.sciviews.org/doku.php?id=tips:data-io:ms_windows&s=excel > which gives many ways of reading Excel into R and read R News 4/1 > which discusses appropriate R classes to use (you would b best to use > Date, not POSIXct, in which case you could not have time zone problems > in the first place) and internal representations of R vs. Excel. > > -- > Statistics & Software Consulting > GKX Group, GKX Associates Inc. > tel: 1-877-GKX-GROUP > email: ggrothendieck at gmail.com > [[alternative HTML version deleted]] _____________________________________________ R-help@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. [[alternative HTML version deleted]] ______________________________________________ R-help@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.