powered by
is_recognized_tzone() returns TRUE for strings that are recognized IANA time zone names, and FALSE otherwise.
is_recognized_tzone()
TRUE
FALSE
is_recognized_tzone(x)
TRUE if x is a recognized time zone, FALSE otherwise.
x
An object to test.
Recognized time zones are those listed in tzdb::tzdb_names(), which provides an up-to-date copy of time zones from the IANA time zone database.
tzdb::tzdb_names()
<phinterval> vectors with an unrecognized time zone are formatted using the "UTC" time zone with a warning.
<phinterval>
"UTC"
is_recognized_tzone("UTC") is_recognized_tzone("America/New_York") is_recognized_tzone("") is_recognized_tzone("badzone") is_recognized_tzone(10L)
Run the code above in your browser using DataLab