[Rd] Timezone warnings on package install in R-alpha
Dominick Samperi
djsamperi at gmail.com
Sun Apr 6 07:02:23 CEST 2014
Hi,
I just discovered a small issue that fits into this thread.
Consider:
z <- as.POSIXlt(Sys.time())
z$gmtoff
Under both Fedora and Windows (using R 3.1.0) I get the
value -14400, which is the number of SECONDS offset
from GMT (for New York), not the number of minutes
offset as specified in the man page for POSIXlt.
I assume that gmtoff is the offset that results when
the adjustment due to z$isdst has already been applied,
so it changes with the seasons, unlike the fixed geographic
zone (-5 for New York City). Please correct me if I am wrong.
Finally, I seem to recall that I was able to read a zoneinfo
file to fetch information like longitude and latitude for the
city that is returned by Sys.timezone(), but either I forgot
how to do this, or the procedure no longer applies. Is this
kind of thing supported?
Thanks,
Dominick
On Thu, Apr 3, 2014 at 10:08 AM, Jon Clayden <jon.clayden at gmail.com> wrote:
> That doesn't seem to be the case. After rebuilding using the old configure
> options, I see
>
>> Sys.getenv("TZDIR")
> [1] ""
>
> Jon
>
>
> On 3 April 2014 14:39, peter dalgaard <pdalgd at gmail.com> wrote:
>
>> Thanks to Brian. Yet another thing that zoomed by without me really
>> noticing.
>>
>> However, I'd like to be sure that it isn't a "make dist" issue. We do seem
>> to ship the correct files in src/extra/tzone, but could you please check
>> Brian's suggestion about TZDIR possibly being set incorrectly?
>>
>> -pd
>>
>> On 03 Apr 2014, at 14:47 , Jon Clayden <jon.clayden at gmail.com> wrote:
>>
>> > Many thanks, Prof Ripley. The "--without-internal-tzcode" option does
>> indeed resolve the problem.
>> >
>> > Regards,
>> > Jon
>> >
>> >
>> > On 3 April 2014 13:38, Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote:
>> > On 03/04/2014 13:27, peter dalgaard wrote:
>> > I'm seeing nothing of the sort with the nightly build of 3.1.0RC, also
>> on 10.9.2. This is a plain-vanilla Xcode+ancillaries build as per Simon's
>> instructions (I think):
>> >
>> > pd$ more config.site
>> > r_arch=${r_arch:=x86_64}
>> > CC="gcc -arch $r_arch"
>> > CXX="g++ -arch $r_arch"
>> > F77="gfortran -arch $r_arch"
>> > FC="gfortran -arch $r_arch"
>> > OBJC="gcc -arch $r_arch"
>> > with_blas="-framework vecLib"
>> > with_lapack=yes
>> >
>> > so either something is up specifically with gcc-4.8, or you managed to
>> hose your time zone data base somehow (/usr/share/zoneinfo, I suppose).
>> >
>> > More likely the one shipping with R, since --with-internal-tzcode is the
>> default on OS X [*]. Setting TZDIR incorrectly would do this:
>> >
>> > > Sys.time()
>> > [1] "2014-04-03 12:37:01 GMT"
>> > Warning messages:
>> > 1: In as.POSIXlt.POSIXct(x, tz) : unknown timezone 'Europe/London'
>> > 2: In as.POSIXlt.POSIXct(x, tz) : unknown timezone 'GMT'
>> > 3: In as.POSIXlt.POSIXct(x, tz) : unknown timezone 'America/New_York'
>> >
>> > when I do that.
>> >
>> > You could try --without-internal-tzcode.
>> >
>> > [*] Although x86_64 OS X has a 64-bit time_t it seems to have a 32-bit
>> time-zone database and so wraps around.
>> >
>> >
>> >
>> > - Peter D.
>> >
>> > On 03 Apr 2014, at 13:24 , Jon Clayden <jon.clayden at gmail.com> wrote:
>> >
>> > For what it's worth, this issue persists in R-rc_2014-04-02_r65358.
>> >
>> > Regards,
>> > Jon
>> >
>> >
>> > On 24 March 2014 10:40, Jon Clayden <jon.clayden at gmail.com> wrote:
>> >
>> > Dear all,
>> >
>> > As of the current R alpha release, I'm seeing timezone-related warnings
>> on
>> > installing any package (including the recommended ones), which I haven't
>> > seen before. For example,
>> >
>> > [~/Documents/Source/R-alpha]$ bin/R CMD INSTALL ~/git/tractor/lib/reportr
>> > * installing to library '/Users/jon/Documents/Source/R-alpha/library'
>> > * installing *source* package 'reportr' ...
>> > Warning in as.POSIXlt.POSIXct(x, tz) : unknown timezone 'Europe/London'
>> > Warning in as.POSIXlt.POSIXct(x, tz) : unknown timezone 'GMT'
>> > Warning in as.POSIXlt.POSIXct(x, tz) :
>> > unknown timezone 'America/New_York'
>> > Warning in as.POSIXlt.POSIXct(x, tz) : unknown timezone 'GMT'
>> > Warning in as.POSIXlt.POSIXct(x, tz) :
>> > unknown timezone 'America/New_York'
>> > ** R
>> > ** preparing package for lazy loading
>> > ** help
>> > *** installing help indices
>> > ** building package indices
>> > ** testing if installed package can be loaded
>> > * DONE (reportr)
>> >
>> > This is R-alpha r65266, built from source on OS X 10.9.2 using gcc 4.8.2.
>> > I ran configure with
>> >
>> > ./configure --with-blas="-framework Accelerate" --with-lapack
>> > --with-system-zlib --enable-memory-profiling
>> > --with-tcl-config=/System/Library/Frameworks/Tcl.framework/tclConfig.sh
>> > --with-tk-config=/System/Library/Frameworks/Tk.framework/tkConfig.sh
>> > CC=gcc-4.8 CXX=g++-4.8 OBJC=clang F77=gfortran-4.8 FC=gfortran-4.8
>> > CPPFLAGS="-D__ACCELERATE__" CFLAGS="-mtune=native -g -O2"
>> > CXXFLAGS="-mtune=native -g -O2" FFLAGS="-mtune=native -g -O2"
>> > FCFLAGS="-mtune=native -g -O2"
>> >
>> > Session info is
>> >
>> > R version 3.1.0 alpha (2014-03-23 r65266)
>> > Platform: x86_64-apple-darwin13.1.0 (64-bit)
>> >
>> > locale:
>> > [1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8
>> >
>> > attached base packages:
>> > [1] stats graphics grDevices utils datasets methods base
>> >
>> > I see some related material in the NEWS, but no indication that these
>> > warnings are expected. I hope this report is helpful.
>> >
>> > All the best,
>> > Jon
>> >
>> >
>> >
>> > [[alternative HTML version deleted]]
>> >
>> > ______________________________________________
>> > R-devel at r-project.org mailing list
>> > https://stat.ethz.ch/mailman/listinfo/r-devel
>> >
>> >
>> >
>> > --
>> > Brian D. Ripley, ripley at stats.ox.ac.uk
>> > Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
>> > University of Oxford, Tel: +44 1865 272861 (self)
>> > 1 South Parks Road, +44 1865 272866 (PA)
>> > Oxford OX1 3TG, UK Fax: +44 1865 272595
>> >
>>
>> --
>> Peter Dalgaard, Professor
>> Center for Statistics, Copenhagen Business School
>> Solbjerg Plads 3, 2000 Frederiksberg, Denmark
>> Phone: (+45)38153501
>> Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
>>
>>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
More information about the R-devel
mailing list