Skip to content

Instantly share code, notes, and snippets.

@onslauth
Created February 24, 2014 07:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save onslauth/9183578 to your computer and use it in GitHub Desktop.
Save onslauth/9183578 to your computer and use it in GitHub Desktop.
(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