This HTML automatically generated with rman for NEMO
Table of Contents

Name

jd2iso - Convert (Modified) Julian Day to a (ISO) civil time

Synopsis

jd2iso [parameter=value]

Description

Written in a rush, this converts Julian Days to Civil Time, using ctime(3) . There are better ways to do it, since this routine cannot go before 1970.0
Some future version will make it real ISO and do the time zones correct.

   # ISO format display the current time:
   date -u +%Y-%m-%dT%H:%M:%S.%N
   2022-12-09T00:05:28.406997840
For reference, MJD2000 = 51544.0, JD2000 = 2451544.5.

Parameters

The following parameters are recognized in order; they may be given in any order if the keyword is also given. Use --help to confirm this man page is up to date.
jd=
If give, this is the input Julian Day to convert.
mjd=
Modified Julian Day (MJD=JD-2400000.5).
tjd=
Truncated Julian Day (TJD=JD-2440000.5).

Examples


jd2iso 2400000.5
### Fatal error [jd2iso]: cannot parse negative seconds: -3506716800 ~ -111.091
years
% jd2iso 2400000.5+50000
Mon Oct  9 20:00:00 1995
% jd2iso 2400000.5+60000 60000 20000
Fri Feb 24 19:00:00 2023
Fri Feb 24 19:00:00 2023
Fri Feb 24 19:00:00 2023
MIRIAD% julian
JULIAN: (Version 15-oct-2013)
22DEC08:19:07:53.0 is Julian Day  2459922.297141
22DEC08:19:07:53.0 is Modified Julian Day   59921.797141
CaveatsLeap seconds and timezones are not properly accounted for.  See Alsoxrandom(3NEMO),
julian(1MIRIAD), ctime(3), time(2) 
https://www.aavso.org/jd-calculator
https://aa.usno.navy.mil/data/JulianDate

Files

src/kernel/misc/jd2iso.c

Author

Peter Teuben

Update History


8-dec-2022    Created        PJT


Table of Contents