tzupdater-package: A Tool For Automatically Download And Compile Tz Database...

tzupdater-packageR Documentation

A Tool For Automatically Download And Compile Tz Database From The IANA Website.

Description

Download and compile any version of the IANA Time Zone Database (also known as Olson database) and make it current in your R session. This will NOT replace your system tz database.

Details

Context:
It can be useful to download and compile the latest tz database because tz information are constently changing, hence your system might not have the latest version. Outdated tz database can cause troubles when converting from UTC to local time and vice-versa. You won't have any obvious error, you will just get wrong UTC offset or zone name.

Prerequisite:
You need the timezone compiler (zic).
-On Windows you can get it by installing Cygwin (https://www.cygwin.com)
zic should be installed in C:\Cygwin\usr\sbin by default. If you installed Cygwin somewhere else,
please add the zic path to your environment pariable PATH or specify the path in the function call.
-On macOS zic is installed by default.
-On Linux zic is generally already available. Otherwise it is part of package tzdata.
Using Alpine Linux you can get it by running the following command:
apk add tzdata

Bugs report:
https://github.com/sthonnard/tzupdater

tzupdater functions

install_last_tz()
Automatically get the latest version available and compile it. Once done make it active. If your tz database is already the latest, do nothing.

get_last_published_tz()
Get the name of the latest version available at IANA website.

get_active_tz_db()
Get the active tz database version on your session.

install_tz(version_to_install)
Download and install the IANA time zone specified in parameter.


tzupdater documentation built on Nov. 12, 2023, 5:06 p.m.