From e376d0eca1cd181b3613f35acb6115428f33d599 Mon Sep 17 00:00:00 2001 From: nirenjan Date: Mon, 21 Jan 2013 11:15:51 -0800 Subject: [PATCH] Add Julian date script based on Unix time --- jdate | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 jdate diff --git a/jdate b/jdate new file mode 100755 index 0000000..1988a07 --- /dev/null +++ b/jdate @@ -0,0 +1,14 @@ +#!/usr/bin/env python +""" Calculate the Julian Date """ + +import time + +t = time.time() + +""" Technically, we should be adding 2440587.5, + however, since we are trying to stick to the stardate + concept, we add only 40587.5""" +jd = t / 86400.0 + 40587.5 + +print "%05.1f" % jd +