tz_offset: Find the offset from UTC at a particular date/time in a...

Description Usage Arguments Value Examples

View source: R/olson.R

Description

Find the offset from UTC at a particular date/time in a particular time zone

Usage

1
tz_offset(dt, tz = "")

Arguments

dt

Date, POSIXt or date-like character string

tz

A time zone name from base::OlsonNames(). Not required if dt is a POSIXt object with a time zone component.

Value

a one-row data frame with details of the time zone

Examples

1
tz_offset("2018-06-12", "America/Moncton")

Example output

sh: 1: timedatectl: Permission denied
Error in file(con, "r") : cannot open the connection
In addition: Warning messages:
1: In system("timedatectl", intern = TRUE) :
  running command 'timedatectl' had status 126
2: In file(con, "r") : cannot open file '/etc/timezone': Permission denied
          tz_name  date_time zone is_dst utc_offset_h
1 America/Moncton 2018-06-12  ADT   TRUE           -3

lutz documentation built on July 20, 2019, 1:04 a.m.