Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

stri_timezone_set

Set or Get Default Time Zone in stringi


Description

stri_timezone_set changes the current default time zone for all functions in the stringi package, i.e., establishes the meaning of the “NULL time zone” argument to date/time processing functions.

stri_timezone_get gets the current default time zone.

For more information on time zone representation in ICU and stringi, refer to stri_timezone_list.

Usage

stri_timezone_get()

stri_timezone_set(tz)

Arguments

tz

single string; time zone identifier

Details

Unless the default time zone has already been set using stri_timezone_set, the default time zone is determined by querying the OS with methods in ICU's internal platform utilities.

Value

stri_timezone_set returns a string with previously used timezone, invisibly.

stri_timezone_get returns a single string with the current default time zone.

References

See Also

Examples

## Not run: 
oldtz <- stri_timezone_set('Europe/Warsaw')
# ... many time zone-dependent operations
stri_timezone_set(oldtz) # restore previous default time zone

## End(Not run)

stringi

Character String Processing Facilities

v1.6.1
file LICENSE
Authors
Marek Gagolewski [aut, cre, cph] (<https://orcid.org/0000-0003-0637-6028>), Bartek Tartanus [ctb], and others (stringi source code); IBM, Unicode, Inc. and others (ICU4C source code, Unicode Character Database)
Initial release
2021-05-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.