Created
February 24, 2014 07:54
-
-
Save onslauth/9183578 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(use-modules (ice-9 format)) | |
(use-modules (srfi srfi-19)) | |
(define utc (current-date 0)) | |
(define sast (current-date)) | |
(format #t "utc ~a\n" utc) | |
(format #t "sast ~a\n" sast) | |
(define utc-jdn (date->modified-julian-day utc)) | |
(define sast-jdn (date->modified-julian-day sast)) | |
(format #t "utc-jdn ~f\n" utc-jdn) | |
(format #t "sast-jdn ~f\n" sast-jdn) | |
##### Output | |
utc #<date nanosecond: 607785000 second: 4 minute: 41 hour: 7 day: 24 month: 2 year: 2014 zone-offset: 0> | |
sast #<date nanosecond: 607869000 second: 4 minute: 41 hour: 9 day: 24 month: 2 year: 2014 zone-offset: 7200> | |
utc-jdn 56712.32019221973 | |
sast-jdn 56712.32019222071 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment