Skip to content
Prev 54239 / 63424 Next

Another issue with Sys.timezone

In the mean time, I have committed a common version (Windows and
non-Windows) of  Sys.timezone()  to the R development sources
(aka "R-devel").

That now uses  as.POSIXlt(Sys.time())  very similarly to the
above "Windows only" case,  but __only__ for  'location=FALSE'
which is not the default.

The most current development source is always available (via
'svn' or alternatively for browsing via your web browser) from

   https://svn.r-project.org/R/trunk/src/library/base/R/datetime.R

As you say yourself, the above system("... xargs md5sum ...")
using workaround is really too platform specific  but I'd guess
there should be a less error prone way to get the long timezone
name on your system ...
If that remains "contained" (i.e. small) and works with files
and R's files tools -- e.g. file.*() ones [but not system()],
I'd consider a patch to the above source file
(sent by you to the R-devel mailing list --- or after having
 gotten an account there by asking, via bug report & patch
 attachment at https://bugs.r-project.org/ )

Best,
Martin