check_tz: Check the timezone of an object and force UTC if absent

View source: R/utils.R

check_tzR Documentation

Check the timezone of an object and force UTC if absent

Description

This function checks the time zone of an inputted object. If the object is of class Date or POSIXct and a time zone is absent, then "UTC" is forced. Otherwise, the object is returned unchanged.

Usage

check_tz(arg = NULL, x)

Arguments

arg

(optional) A character string which defines the argument of the parent function.

x

An object.

Value

An object as inputted in which, if the object is of class Date or POSIXct and a time zone is absent, time zone "UTC" is forced.

Author(s)

Edward Lavender


edwardlavender/prettyGraphics documentation built on Jan. 19, 2025, 2:47 p.m.