to_datetime: Convert a POSIXct or character datetime to a format ready for...

View source: R/helper-functions.R

to_datetimeR Documentation

Convert a POSIXct or character datetime to a format ready for a URL

Description

Datetimes accepted by the API need to be given in UTC. This function will accept a datetime or a character with a suitable datetime format, and output a character that is suitable for a URL. All URL input and output in this package should be in Melbourne time, and the UTC conversion should happen

Usage

to_datetime(datetime)

Arguments

datetime

POSIXct or Character.

Details

The API seems to accept both "%Y-%m-%dT%H:%M:%OS" and "%Y-%m-%d %H:%M:%OS", but we opt for the former.

Value

Character.


ptvapi documentation built on May 29, 2024, 4:48 a.m.