convert_tz: Convert Time Zones

View source: R/datetimes.R

convert_tzR Documentation

Convert Time Zones

Description

Convert the time zones of a layer to a specified TZ

Usage

convert_tz(x, tz, dttm_fields)

Arguments

x

a dataframe

tz

the timezone to convert datetime columns to

dttm_fields

a character vector of field names to convert to tz

Details

This function converts each datetime column to a specified timezone. This is a superficial conversion and doesn't actually change the moment of time, just the way it is displayed

The function is neccessary because sf::st_read returns datetimes in a different TZ (GMT/BST) to the API. So when returning cached data, you will get a different result to data from the api.


MatthewJWhittle/getarc documentation built on April 22, 2023, 12:16 p.m.