Provides some basic information on a given time zone identifier.
Arguments
- tz
NULLor''for default time zone, or a single string with time zone ID otherwise- locale
NULLor''for default locale, or a single string with locale identifier- display_type
single string; one of
'short','long','generic_short','generic_long','gmt_short','gmt_long','common','generic_location'
Value
Returns a list with the following named components:
ID(time zone identifier),Name(localized human-readable time zone name),Name.Daylight(localized human-readable time zone name when DST is used, if available),Name.Windows(Windows time zone ID, if available),RawOffset(raw GMT offset, in hours, before taking daylight savings into account), andUsesDaylightTime(states whether a time zone uses daylight savings time in the current Gregorian calendar year).
Details
Used to fetch basic information on any supported time zone.
For more information on time zone representation in ICU,
see stri_timezone_list.
See also
The official online manual of stringi at https://stringi.gagolewski.com/
Gagolewski M., stringi: Fast and portable character string processing in R, Journal of Statistical Software 103(2), 2022, 1-59, doi:10.18637/jss.v103.i02
Other datetime:
stri_datetime_add(),
stri_datetime_create(),
stri_datetime_fields(),
stri_datetime_format(),
stri_datetime_fstr(),
stri_datetime_now(),
stri_datetime_symbols(),
stri_timezone_get(),
stri_timezone_list()
Other timezone:
stri_timezone_get(),
stri_timezone_list()
Author
Marek Gagolewski and other contributors
Examples
stri_timezone_info()
#> $ID
#> [1] "Etc/UTC"
#>
#> $Name
#> [1] "GMT"
#>
#> $Name.Daylight
#> [1] NA
#>
#> $Name.Windows
#> [1] "UTC"
#>
#> $RawOffset
#> [1] 0
#>
#> $UsesDaylightTime
#> [1] FALSE
#>
stri_timezone_info(locale='sk_SK')
#> $ID
#> [1] "Etc/UTC"
#>
#> $Name
#> [1] "koordinovaný svetový čas"
#>
#> $Name.Daylight
#> [1] NA
#>
#> $Name.Windows
#> [1] "UTC"
#>
#> $RawOffset
#> [1] 0
#>
#> $UsesDaylightTime
#> [1] FALSE
#>
sapply(c('short', 'long', 'generic_short', 'generic_long',
'gmt_short', 'gmt_long', 'common', 'generic_location'),
function(e) stri_timezone_info('Europe/London', display_type=e))
#> short long generic_short
#> ID "Europe/London" "Europe/London" "Europe/London"
#> Name "GMT" "GMT" "GB"
#> Name.Daylight "GMT+1" "GMT+01:00" "GB"
#> Name.Windows "GMT Standard Time" "GMT Standard Time" "GMT Standard Time"
#> RawOffset 0 0 0
#> UsesDaylightTime TRUE TRUE TRUE
#> generic_long gmt_short gmt_long
#> ID "Europe/London" "Europe/London" "Europe/London"
#> Name "GB" "+0000" "GMT"
#> Name.Daylight "GB" "+0100" "GMT+01:00"
#> Name.Windows "GMT Standard Time" "GMT Standard Time" "GMT Standard Time"
#> RawOffset 0 0 0
#> UsesDaylightTime TRUE TRUE TRUE
#> common generic_location
#> ID "Europe/London" "Europe/London"
#> Name "GMT" "GB"
#> Name.Daylight "GMT+1" "GB"
#> Name.Windows "GMT Standard Time" "GMT Standard Time"
#> RawOffset 0 0
#> UsesDaylightTime TRUE TRUE