;ELC ;;; compiled by kwzh@psilocin.gnu.ai.mit.edu on Sun Jul 7 20:11:23 1996 ;;; from file /gd/gnu/emacs/19.0/lisp/timezone.el ;;; emacs version 19.31.91.1. ;;; bytecomp version FSF 2.10 ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19.29"))) (error "`timezone.el' was compiled for Emacs 19.29 or later")) (provide (quote timezone)) #@217 *Time differentials of timezone from GMT in +-HHMM form. This list is obsolescent, and is present only for backwards compatibility, because time zone names are ambiguous in practice. Use `current-time-zone' instead. (defvar timezone-world-timezones (quote (("PST" . -800) ("PDT" . -700) ("MST" . -700) ("MDT" . -600) ("CST" . -600) ("CDT" . -500) ("EST" . -500) ("EDT" . -400) ("AST" . -400) ("NST" . -330) ("UT" . 0) ("GMT" . 0) ("BST" . 100) ("MET" . 100) ("EET" . 200) ("JST" . 900) ("GMT+1" . 100) ("GMT+2" . 200) ("GMT+3" . 300) ("GMT+4" . 400) ("GMT+5" . 500) ("GMT+6" . 600) ("GMT+7" . 700) ("GMT+8" . 800) ("GMT+9" . 900) ("GMT+10" . 1000) ("GMT+11" . 1100) ("GMT+12" . 1200) ("GMT+13" . 1300) ("GMT-1" . -100) ("GMT-2" . -200) ("GMT-3" . -300) ("GMT-4" . -400) ("GMT-5" . -500) ("GMT-6" . -600) ("GMT-7" . -700) ("GMT-8" . -800) ("GMT-9" . -900) ("GMT-10" . -1000) ("GMT-11" . -1100) ("GMT-12" . -1200))) (#$ . -508)) #@75 Alist of first three letters of a month and its numerical representation. (defvar timezone-months-assoc (quote (("JAN" . 1) ("FEB" . 2) ("MAR" . 3) ("APR" . 4) ("MAY" . 5) ("JUN" . 6) ("JUL" . 7) ("AUG" . 8) ("SEP" . 9) ("OCT" . 10) ("NOV" . 11) ("DEC" . 12))) (#$ . 1441)) #@260 Convert DATE to an arpanet standard date. Optional 1st argument LOCAL specifies the default local timezone of the DATE; if nil, GMT is assumed. Optional 2nd argument TIMEZONE specifies a time zone to be represented in; if nil, the local time zone is assumed. (defalias 'timezone-make-date-arpa-standard #[(date &optional local timezone) "À \n #Å\fÆH\fÇH\fÈHÉ\fÊH\fËH\fÌH#\fÍH%)‡" [timezone-fix-time date local timezone new timezone-make-arpa-date 0 1 2 timezone-make-time-string 3 4 5 6] 9 (#$ . 1722)]) #@257 Convert DATE to a sortable date string. Optional 1st argument LOCAL specifies the default local timezone of the DATE; if nil, GMT is assumed. Optional 2nd argument TIMEZONE specifies a timezone to be represented in; if nil, the local time zone is assumed. (defalias 'timezone-make-date-sortable #[(date &optional local timezone) "À \n #Å\fÆH\fÇH\fÈHÉ\fÊH\fËH\fÌH#$)‡" [timezone-fix-time date local timezone new timezone-make-sortable-date 0 1 2 timezone-make-time-string 3 4 5] 9 (#$ . 2234)]) #@118 Make arpanet standard date string from YEAR, MONTH, DAY, and TIME. Optional argument TIMEZONE specifies a time zone. (defalias 'timezone-make-arpa-date #[(year month day time &optional timezone) "<ƒ.Á!‰ÃWƒ\n[‚\nÅÆ\nÃWƒ\"Ç‚#È\fÉ¥\fɦ$*‚/\nÅË\fÍÎ\"@!\n&)‡" [timezone timezone-zone-to-minute m 0 absm format "%c%02d%02d" 45 43 60 zone "%02d %s %04d %s %s" day capitalize rassq month timezone-months-assoc year time] 8 (#$ . 2736)]) #@60 Make sortable date string from YEAR, MONTH, DAY, and TIME. (defalias 'timezone-make-sortable-date #[(year month day time) "ÀÁ\n \f %‡" [format "%4d%02d%02d%s" year month day time] 6 (#$ . 3196)]) #@49 Make time string from HOUR, MINUTE, and SECOND. (defalias 'timezone-make-time-string #[(hour minute second) "ÀÁ\n \f$‡" [format "%02d:%02d:%02d" hour minute second] 5 (#$ . 3398)]) #@446 Parse DATE and return a vector [YEAR MONTH DAY TIME TIMEZONE]. 19 is prepended to year if necessary. Timezone may be nil if nothing. Understands the following styles: (1) 14 Apr 89 03:20[:12] [GMT] (2) Fri, 17 Mar 89 4:01[:33] [GMT] (3) Mon Jan 16 16:12[:37] [GMT] 1989 (4) 6 May 1992 1641-JST (Wednesday) (5) 22-AUG-1993 10:59:12.82 (6) Thu, 11 Apr 16:17:12 91 [MET] (7) Mon, 6 Jul 16:47:20 T 1992 [MET] (8) 1996-06-24 21:13:12 [GMT] (defalias 'timezone-parse-date #[(date) ";ƒ#ÁÂ\"„ÃÂ\"ƒ#Ä!‰ƒ#ÅÂGÆ$ˆ†(ÇÆ‰‰‰‰ \n \fÍÎ\"ƒQÏ\fÐ Ñ\nÒ Æ‚/ÍÓ\"ƒjÏ\fÐ Ñ\nÒ Ô‚/ÍÕ\"ƒƒÐ\fÑ Ö\nÒ Æ‚/Í×\"ƒœÐ\fÑ Ö\nÒ Ø‚/ÍÙ\"ƒµÒ\fÖ Ñ\nÐ Æ‚/ÍÚ\"ƒÎØ\fÖ Ñ\nÐ Ò‚/ÍÛ\"ƒçÐ\fÑ Ö\nÒ Ø‚/ÍÜ\"ƒÐ\fÑ Ö\nÒ Æ‚/ÍÝ\"ƒÖ\fÑ Ð\nÒ Ø‚/ÍÞ\"ƒ/Ö\fÑ Ð\nÒ Æ\fƒ”\f”\f•O‰\fGÒWƒNß\fàÆOP\f ”Ñ\\HáUƒg ” ”Ñ\\O‚~ ” ”Ð\\O\"ãä\"–%\"A!) \n”\n•O\n ” •O ƒ£”•O\fƒ·æ\f \n %‚¾æç‰‰‰Æ%.‡" [date text-properties-at 0 next-property-change copy-sequence set-text-properties nil "" zone time day month year string-match "\\([^ ,]+\\),[ ]+\\([0-9]+\\)[ ]+\\([^ ,]+\\)[ ]+\\([0-9]+:[0-9:]+\\)[ ]+\\(T[ ]+\\|\\)\\([0-9]+\\)[ ]*\\'" 6 3 2 4 "\\([^ ,]+\\),[ ]+\\([0-9]+\\)[ ]+\\([^ ,]+\\)[ ]+\\([0-9]+:[0-9:]+\\)[ ]+\\(T[ ]+\\|\\)\\([0-9]+\\)[ ]*\\([-+a-zA-Z0-9]+\\)" 7 "\\([0-9]+\\)[ ]+\\([^ ,]+\\)[ ]+\\([0-9]+\\)[ ]+\\([0-9]+:[0-9:]+\\)[ ]*\\'" 1 "\\([0-9]+\\)[ ]+\\([^ ,]+\\)[ ]+\\([0-9]+\\)[ ]+\\([0-9]+:[0-9:]+\\)[ ]*\\([-+a-zA-Z0-9]+\\)" 5 "\\([^ ,]+\\)[ ]+\\([0-9]+\\)[ ]+\\([0-9]+:[0-9:]+\\)[ ]+\\([0-9]+\\)" "\\([^ ,]+\\)[ ]+\\([0-9]+\\)[ ]+\\([0-9]+:[0-9:]+\\)[ ]+\\([-+a-zA-Z0-9]+\\)[ ]+\\([0-9]+\\)" "\\([0-9]+\\)[ ]+\\([^ ,]+\\)[ ]+\\([0-9]+\\)[ ]+\\([0-9]+\\)[ ]*\\([-+a-zA-Z0-9]+\\)" "\\([0-9]+\\)-\\([A-Za-z]+\\)-\\([0-9]+\\)[ ]+\\([0-9]+:[0-9]+:[0-9]+\\)\\.[0-9]+" "\\([0-9]+\\)-\\([0-9]+\\)-\\([0-9]+\\)[ ]+\\([0-9]+:[0-9]+:[0-9]+\\)[ ]*\\([-+a-zA-Z0-9]+\\)" "\\([0-9]+\\)-\\([0-9]+\\)-\\([0-9]+\\)[ ]+\\([0-9]+:[0-9]+:[0-9]+\\)" "19" -2 45 string int-to-string assoc timezone-months-assoc vector "0"] 7 (#$ . 3586)]) #@106 Parse TIME (HH:MM:SS) and return a vector [hour minute second]. Recognize HH:MM:SS, HH:MM, HHMMSS, HHMM. (defalias 'timezone-parse-time #[(time) "†Á‰‰ÆÇ\"ƒÈÉÊ‚IÆË\"ƒ,ÈÉ‚IÆÌ\"ƒ<ÈÉÊ‚IÆÍ\"ƒIÈÉÂÎ ƒW ” •O‚XÏ\fƒe\f”\f•O‚fÏ ƒs ” •O‚tÏ#,‡" [time "" nil second minute hour string-match "\\`\\([0-9]+\\):\\([0-9]+\\):\\([0-9]+\\)\\'" 1 2 3 "\\`\\([0-9]+\\):\\([0-9]+\\)\\'" "\\`\\([0-9][0-9]\\)\\([0-9][0-9]\\)\\([0-9][0-9]\\)\\'" "\\`\\([0-9][0-9]\\)\\([0-9][0-9]\\)\\'" vector "0"] 6 (#$ . 5765)]) #@185 Translate TIMEZONE to an integer minute offset from GMT. TIMEZONE can be a cons cell containing the output of current-time-zone, or an integer of the form +-HHMM, or a time zone name. (defalias 'timezone-zone-to-minute #[(timezone) ":ƒ\n@Á¥‡ƒC– \"A†‰;ƒ\"Ä!Å!‰Ç¥Á_Ǧ\\ÉWƒ?[‚A*‡É‡" [timezone 60 assoc timezone-world-timezones string-to-int abs abszone 100 minutes 0] 4 (#$ . 6304)]) #@279 Compute the UTC time equivalent to DATE at time SECONDS after midnight. Return a list suitable as an argument to current-time-zone, or nil if the date cannot be thus represented. DATE is the number of days elapsed since the (imaginary) Gregorian date Sunday, December 31, 1 BC. (defalias 'timezone-time-from-absolute #[(date seconds) "À\n ZÄÅ! _\\ÄÈ! Ê ¥!‰  _\fÊ\fZ! Î\f \\Z!ÏW…E  B.‡" [719162 current-time-origin date days float 86400 seconds-per-day seconds 65536 current-time-arithmetic-base floor hi hibase lo abs 2] 5 (#$ . 6720)]) #@286 Compute the local time zone for DATE at time SECONDS after midnight. Return a list in the same format as current-time-zone's result, or nil if the local time zone could not be computed. DATE is the number of days elapsed since the (imaginary) Gregorian date Sunday, December 31, 1 BC. (defalias 'timezone-time-zone-from-absolute #[(date seconds) "ÀÁ!… \f\"‰…Á !‰@…))‡" [fboundp current-time-zone timezone-time-from-absolute date seconds utc-time zone] 4 (#$ . 7293)]) #@162 Convert DATE (default timezone LOCAL) to YYYY-MM-DD-HH-MM-SS-ZONE vector. If LOCAL is nil, it is assumed to be GMT. If TIMEZONE is nil, use the local time zone. (defalias 'timezone-fix-time #[(date local timezone) "À ! ÃH!‰ÅWƒ\fÆ\\‚#\fÇWƒ\"\fÈ\\‚#\f ÉH!\n ËH!\fÍ ÎH!ÂÃH!ÂÉH!ÂËH! ÓH†Y†uÖ×\n\f\f#Ø_\\Ø_\\\"Ù!Ù!Z\\ÛØ\"\\Ø_ZÝXƒÕÝZ\fT\fÞ\n\f\"\fWƒ\nT\nÉ\fß\nWƒÉ\n\fT‚ÃVƒÝ\\\fS\fÉ\fVƒ\nS\nÉ\nVƒß\n\fSÞ\n\f\"\fà\f\n\f&.‡" [timezone-parse-date date string-to-int 0 year 50 2000 100 1900 1 month 2 day timezone-parse-time 3 time hour minute second 4 local timezone timezone-time-zone-from-absolute timezone-absolute-from-gregorian 60 timezone-zone-to-minute diff floor hour-fix 24 timezone-last-day-of-month 12 vector] 9 (#$ . 7780)]) #@36 The last day in MONTH during YEAR. (defalias 'timezone-last-day-of-month #[(month year) "ÁUƒ !ƒćÅSH‡" [month 2 timezone-leap-year-p year 29 [31 28 31 30 31 30 31 31 30 31 30 31]] 2 (#$ . 8642)]) #@45 Returns t if YEAR is a Gregorian leap year. (defalias 'timezone-leap-year-p #[(year) "Á¦ÂUƒæÂU?†ĦÂU‡" [year 4 0 100 400] 2 (#$ . 8851)]) #@67 Return the day number within the year of the date month/day/year. (defalias 'timezone-day-number #[(month day year) " SÂ_\\ ÄVƒ! Å_Æ\\Ç¥ZÈ !ƒ! T )‡" [day month 31 day-of-year 2 4 23 10 timezone-leap-year-p year] 3 (#$ . 9003)]) #@137 The number of days between the Gregorian date 12/31/1 BC and month/day/year. The Gregorian date Sunday, December 31, 1 BC is imaginary. (defalias 'timezone-absolute-from-gregorian #[(month day year) "À \n # SÄ_\\ SÅ¥\\ SÆ¥[\\ SÇ¥\\‡" [timezone-day-number month day year 365 4 100 400] 4 (#$ . 9246)])