gettz (version 0.0.3)

gettz-package: gettz

Description

gettz

Arguments

Details

R has a function Sys.timezone which tries hard to retrieve the same information. However, we have found instances where it failed to provide an answer---whereas the simple code in this package does.

This package provides a single function gettz which looks at /etc/timezone (on Debian/Ubuntu), /etc/sysconfig/clock (on RedHat/CentOS/Fedora) or /etc/TIMEZONE (on Solaris). In case no information can be provided, NULL is returned.

Windows support is bare-bones: the package builds, but does not do anything. One could probably deploy custom code to query the registry but given that R already does, there is imminent need.

References

http://stackoverflow.com/a/33881726/143305

Examples

Run this code
# NOT RUN {
  gettz()
# }

Run the code above in your browser using DataLab