The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

Type: Package
Title: Coordinated Universal Time Transformations
Version: 0.1.5
Author: Antonio J. Segura
Maintainer: Antonio J. Segura <segura.antonioj@gmail.com>
Description: Three functions are provided: first function changes time from local to UTC, other changes from UTC to local and third returns difference between local and UTC. %h+% operator is also provided it adds hours to a time.
License: GPL-2
Encoding: UTF-8
LazyData: FALSE
Suggests: testthat
RoxygenNote: 6.0.1
NeedsCompilation: no
Packaged: 2019-01-02 06:05:11 UTC; AntoJo
Repository: CRAN
Date/Publication: 2019-01-04 10:50:03 UTC

add hours

Description

This function adds h hours to a POSIXct

Usage

h %h+% datetime

Arguments

h

number of hours

datetime

POSIXct

Value

POSIXct and h added


fromUTC

Description

Returns local time from UTC time

Usage

fromUTC(utctime, timeformat = "%Y-%m-%d %H:%M:%S")

Arguments

utctime

POSIXct UTC time

timeformat

string format of local time, by default it will be "%Y-%m-%d %H:%M:%S"

Value

localtime POSIXct local time

Examples

 fromUTC( as.POSIXct("1991-06-29 05:27:25", tz = "UTC") )


hoursUTC

Description

This function returns time difference between UTC and Local

Usage

hoursUTC(to_test_time = Sys.time(), timeformat = "%Y-%m-%d %H:%M:%S")

Arguments

to_test_time

only for testing UTC Sys.time()

timeformat

string format of local time, by default it will be "%Y-%m-%d %H:%M:%S"

Value

number of hours


toUTC

Description

Returns UTC time from local time

Usage

toUTC(localtime, timeformat = "%Y-%m-%d %H:%M:%S")

Arguments

localtime

POSIXct local time

timeformat

string format of local time, by default it will be "%Y-%m-%d %H:%M:%S"

Value

utctime POSIXct UTC time

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.