dmjd2ut {astroFns}R Documentation

DMJD to UT

Description

Decimal modified Julian date to Universal time.

Usage

dmjd2ut(dmjd, tz='UTC')

Arguments

dmjd

Time in decimal Modified Julian Date

tz

Time zone string

Details

Calculation is always from UTC, but it is possible to correct to local time zone with tz (see Sys.timezone). For instance, tz = 'EST5EDT' converts to U.S. Eastern time, with EST or EDT based on the system's knowledge of the date for switching between the two. Set the number of digits after the decimal place for seconds, n, with options('digits.secs'=n).

Value

Time string with class POSIXct

Author(s)

Andrew Harris

See Also

ut2dmjd, ymd2jd, strptime, ISOdatetime, axis.POSIXct for time in plot axes; as.POSIXct to recover time in plot from locator()

Examples

dmjd2ut(56951.54183613)

sd <- getOption('digits.secs')
dmjd2ut(ut2dmjd(2010, 1, 5, 2, 34, 17.8115))
options('digits.secs' = 3)
dmjd2ut(ut2dmjd(2015, 1, 5, 2, 34, 17.8115))
options('digits.secs' = sd)

dmjd2ut(ut2dmjd(2015, 1, 5, 2, 34, 17.8115), tz='CET')
dmjd2ut(ut2dmjd(2015, 8, 5, 2, 34, 17.8115), tz='CET')
dmjd2ut(ut2dmjd(2015, 1, 5, 2, 34, 17.8115), tz='EST5EDT')
dmjd2ut(ut2dmjd(2015, 8, 5, 2, 34, 17.8115), tz='EST5EDT')

dmjd2ut(ymd2jd(2001, 1, 1) - 2400000.5)

[Package astroFns version 4.2-1 Index]