Commit b2316aa5 authored by Liam M. Healy's avatar Liam M. Healy
Browse files

Timezone information is in numerical hours, made into pqd when used

parent fefd48d2
;; Convert time scales
;; Liam Healy Sat Feb 4 2006 - 18:00
;; Time-stamp: <2013-11-24 12:54:20EST convert-timescale.lisp>
;; Time-stamp: <2014-01-05 18:58:56EST convert-timescale.lisp>
;; Copyright 2011, 2013 Liam M. Healy
;; Copyright 2011, 2013, 2014 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
......@@ -297,9 +297,11 @@
(otherwise
(setf (slot-value timepoint 'scale) :utc)
(antik:- timepoint
(or (rest (assoc scale *timezone-offsets*)) ; scale can be a named time zone
(when (numberp scale) (make-pq scale 'hour)) ; or an hour offset
(error "Time scale ~a not known" scale))))))
(make-pq
(or (rest (assoc scale *timezone-offsets*)) ; scale can be a named time zone
(when (numberp scale) scale) ; or an hour offset
(error "Time scale ~a not known" scale)))
'hour))))
(:ut1
(ecase scale
(:utc (convert-utc-ut1 timepoint t))
......
;; Read timepoint specifications.
;; Liam Healy, Sat Feb 4 2006 - 12:17
;; Time-stamp: <2011-09-18 21:26:04EDT read-time.lisp>
;; Time-stamp: <2014-01-05 18:06:36EST read-time.lisp>
;; Copyright 2011 Liam M. Healy
;; Copyright 2011, 2014 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
......@@ -99,132 +99,132 @@
:day-only (or (cl:<= (length poss) 3) (not timespecp))))))))
(defparameter *timezone-offsets*
'((:acdt . #_10.5_hours)
(:acst . #_9.5_hours)
(:act . #_8_hours)
(:adt . #_-3_hours)
(:aedt . #_11_hours)
(:aest . #_10_hours)
(:aft . #_4.5_hours)
(:akdt . #_-8_hours)
(:akst . #_-9_hours)
(:amst . #_5_hours)
(:amt . #_4_hours)
(:art . #_-3_hours)
(:arab . #_3_hours)
(:arabian . #_4_hours)
(:awdt . #_9_hours)
(:awst . #_8_hours)
(:azost . #_-1_hours)
(:bdt . #_8_hours)
(:biot . #_6_hours)
(:bit . #_-12_hours)
(:bot . #_-4_hours)
(:brt . #_-3_hours)
(:bangladesh . #_6_hours)
(:bst . #_1_hours)
(:btt . #_6_hours)
(:cat . #_2_hours)
(:cdt . #_-5_hours)
(:cedt . #_2_hours)
(:cest . #_2_hours)
(:cet . #_1_hours)
(:chadt . #_13.75_hours)
(:chast . #_12.75_hours)
(:cist . #_-8_hours)
(:ckt . #_-10_hours)
(:clt . #_-4_hours)
(:cost . #_4_hours)
(:cot . #_-5_hours)
(:cst . #_-6_hours)
(:china . #_8_hours)
(:centaust . #_9.5_hours)
(:ct . #_8_hours)
(:cvt . #_-1_hours)
(:cxt . #_7_hours)
(:chst . #_10_hours)
(:east . #_-6_hours)
(:eat . #_3_hours)
(:ect . #_-4_hours) ; carribean
(:ecuador . #_-5_hours)
(:edt . #_-4_hours)
(:eedt . #_3_hours)
(:eet . #_2_hours)
(:est . #_-5_hours)
(:fkst . #_-3_hours)
(:fkt . #_-4_hours)
(:galt . #_-6_hours)
(:get . #_4_hours)
(:gft . #_-3_hours)
(:gilt . #_12_hours)
(:git . #_-9_hours)
(:gmt . #_0_hours)
(:gst . #_-2_hours)
(:gyt . #_-4_hours)
(:hadt . #_-9_hours)
(:hast . #_-10_hours)
(:hkt . #_8_hours)
(:hmt . #_5_hours)
(:hst . #_-10_hours)
(:ict . #_7_hours)
(:idt . #_3_hours)
(:irkt . #_8_hours)
(:irst . #_3.5_hours)
(:ist . #_5.5_hours) ; Indian summer time
(:irish . #_1_hours) ; Irish summer time
(:israel . #_2_hours) ; Israel standard time
(:jst . #_9_hours)
(:krat . #_7_hours)
(:kst . #_9_hours)
(:lhst . #_10.5_hours)
(:lint . #_14_hours)
(:magt . #_11_hours)
(:mdt . #_-6_hours)
(:mit . #_9.5_hours)
(:msd . #_4_hours)
(:msk . #_3_hours)
(:mst . #_-7_hours)
(:malaysia . #_8_hours)
(:myanmar . #_6.5_hours)
(:mut . #_4_hours)
(:myt . #_8_hours)
(:ndt . #_-2.5_hours)
(:nft . #_11.5_hours)
(:npt . #_5.75_hours)
(:nst . #_-3.5_hours)
(:nzdt . #_13_hours)
(:nzst . #_12_hours)
(:omst . #_6_hours)
(:pdt . #_-7_hours)
(:pett . #_12_hours)
(:phot . #_13_hours)
(:pkt . #_5_hours)
(:pst . #_-8_hours)
(:phillipine . #_8_hours)
(:ret . #_4_hours)
(:samt . #_4_hours)
(:sast . #_2_hours)
(:sbt . #_11_hours)
(:sct . #_4_hours)
(:sgt . #_8_hours)
(:slt . #_5.5_hours)
(:sst . #_-11_hours)
(:singapore . #_8_hours)
(:taht . #_-10_hours)
(:tha . #_7_hours)
(:uyst . #_-2_hours)
(:uyt . #_-3_hours)
(:vet . #_-4.5_hours)
(:vlat . #_10_hours)
(:wat . #_1_hours)
(:wedt . #_1_hours)
(:west . #_1_hours)
(:wet . #_0_hours)
(:wst . #_8_hours)
(:yakt . #_9_hours)
(:yekt . #_5_hours))
'((:acdt . 10.5)
(:acst . 9.5)
(:act . 8)
(:adt . -3)
(:aedt . 11)
(:aest . 10)
(:aft . 4.5)
(:akdt . -8)
(:akst . -9)
(:amst . 5)
(:amt . 4)
(:art . -3)
(:arab . 3)
(:arabian . 4)
(:awdt . 9)
(:awst . 8)
(:azost . -1)
(:bdt . 8)
(:biot . 6)
(:bit . -12)
(:bot . -4)
(:brt . -3)
(:bangladesh . 6)
(:bst . 1)
(:btt . 6)
(:cat . 2)
(:cdt . -5)
(:cedt . 2)
(:cest . 2)
(:cet . 1)
(:chadt . 13.75)
(:chast . 12.75)
(:cist . -8)
(:ckt . -10)
(:clt . -4)
(:cost . 4)
(:cot . -5)
(:cst . -6)
(:china . 8)
(:centaust . 9.5)
(:ct . 8)
(:cvt . -1)
(:cxt . 7)
(:chst . 10)
(:east . -6)
(:eat . 3)
(:ect . -4) ; carribean
(:ecuador . -5)
(:edt . -4)
(:eedt . 3)
(:eet . 2)
(:est . -5)
(:fkst . -3)
(:fkt . -4)
(:galt . -6)
(:get . 4)
(:gft . -3)
(:gilt . 12)
(:git . -9)
(:gmt . 0)
(:gst . -2)
(:gyt . -4)
(:hadt . -9)
(:hast . -10)
(:hkt . 8)
(:hmt . 5)
(:hst . -10)
(:ict . 7)
(:idt . 3)
(:irkt . 8)
(:irst . 3.5)
(:ist . 5.5) ; Indian summer time
(:irish . 1) ; Irish summer time
(:israel . 2) ; Israel standard time
(:jst . 9)
(:krat . 7)
(:kst . 9)
(:lhst . 10.5)
(:lint . 14)
(:magt . 11)
(:mdt . -6)
(:mit . 9.5)
(:msd . 4)
(:msk . 3)
(:mst . -7)
(:malaysia . 8)
(:myanmar . 6.5)
(:mut . 4)
(:myt . 8)
(:ndt . -2.5)
(:nft . 11.5)
(:npt . 5.75)
(:nst . -3.5)
(:nzdt . 13)
(:nzst . 12)
(:omst . 6)
(:pdt . -7)
(:pett . 12)
(:phot . 13)
(:pkt . 5)
(:pst . -8)
(:phillipine . 8)
(:ret . 4)
(:samt . 4)
(:sast . 2)
(:sbt . 11)
(:sct . 4)
(:sgt . 8)
(:slt . 5.5)
(:sst . -11)
(:singapore . 8)
(:taht . -10)
(:tha . 7)
(:uyst . -2)
(:uyt . -3)
(:vet . -4.5)
(:vlat . 10)
(:wat . 1)
(:wedt . 1)
(:west . 1)
(:wet . 0)
(:wst . 8)
(:yakt . 9)
(:yekt . 5))
;; from http://en.wikipedia.org/wiki/List_of_time_zone_abbreviations
"Timezones that may be used to input timepoints.")
"Timezones and number of hours from UTC, used to input timepoints.")
(defparameter *timescales*
(append '("utc" "tai" "gps" "ut1") (mapcar #'first *timezone-offsets*))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment