;ELC ;;; Compiled ;;; in Emacs version 27.1 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; #@216 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 '(("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)) (#$ . 409)) #@75 Alist of first three letters of a month and its numerical representation. (defvar timezone-months-assoc '(("JAN" . 1) ("FEB" . 2) ("MAR" . 3) ("APR" . 4) ("MAY" . 5) ("JUN" . 6) ("JUL" . 7) ("AUG" . 8) ("SEP" . 9) ("OCT" . 10) ("NOV" . 11) ("DEC" . 12)) (#$ . 1333)) #@260 Convert DATE to an arpanet standard date. Optional 2nd argument LOCAL specifies the default local timezone of the DATE; if nil, GMT is assumed. Optional 3rd 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) "\304 \n#\305 \306H \307H \310H\311 \312H \313H \314H# \315H%)\207" [date local timezone new timezone-fix-time timezone-make-arpa-date 0 1 2 timezone-make-time-string 3 4 5 6] 9 (#$ . 1607)]) #@257 Convert DATE to a sortable date string. Optional 2nd argument LOCAL specifies the default local timezone of the DATE; if nil, GMT is assumed. Optional 3rd 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) "\304 \n#\305 \306H \307H \310H\311 \312H \313H \314H#$)\207" [date local timezone new timezone-fix-time timezone-make-sortable-date 0 1 2 timezone-make-time-string 3 4 5] 9 (#$ . 2145)]) #@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) "<\203.\306!\211\307W\203 [\202 \310\311 \307W\203\"\312\202#\313\n\314\245\n\314\246$*\202/\310\315\f\316\317 \"@! &)\207" [timezone m absm zone day month timezone-zone-to-minute 0 format "%c%02d%02d" 45 43 60 "%02d %s %04d %s %s" capitalize rassq timezone-months-assoc year time] 8 (#$ . 2671)]) #@60 Make sortable date string from YEAR, MONTH, DAY, and TIME. (defalias 'timezone-make-sortable-date #[(year month day time) "\304\305 \n %\207" [year month day time format "%4d%02d%02d%s"] 6 (#$ . 3191)]) #@49 Make time string from HOUR, MINUTE, and SECOND. (defalias 'timezone-make-time-string #[(hour minute second) "\303\304 \n$\207" [hour minute second format "%02d:%02d:%02d"] 5 (#$ . 3401)]) #@594 Parse DATE and return a vector [YEAR MONTH DAY TIME TIMEZONE]. Two-digit dates are `windowed'. Those <69 have 2000 added; otherwise 1900 is added. Three-digit dates have 1900 added. TIMEZONE is nil for DATEs without a zone field. 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] (9) 1996-06-24 21:13-ZONE (10) 19960624T211312 (defalias 'timezone-parse-date #[(date) ";\203#\306\307\"\204\310\307\"\203#\311!\211\203#\312\307G\313$\210\206(\314\313\211\211\211\211\315\316\"\203G\317\320\321\322\323\202 \315\324\"\203[\317\320\321\322\313\202 \315\325\"\203o\326\317\320\322\313\202 \315\327\"\203\203\326\317\320\322\330\202 \315\331\"\203\227\322\321\320\317\313\202 \315\332\"\203\253\323\321\320\317\322\202 \315\333\"\203\277\317\320\321\322\323\202 \315\334\"\203\323\317\320\321\322\326\202 \315\335\"\203\347\317\320\321\322\313\202 \315\336\"\203\373\321\320\317\322\323\202 \315\337\"\203\321\320\317\322\323\202 \315\340\"\203 \321\320\317\322\313 \203\246\341 \"\211G\322W\203I\342 !\211.\343W\203A.\344\\.\345\346.\\!)\f\224\320\\H\347U\204q\342\350\f\224\320\\H!!/\351/!\307H\f\224\320\\HU)\203}\352\f\224\f\224\320\\#\202\233\352\f\224\f\224\317\\#0\3530\2261\"A\2112\205\232\3452!*\341 \"\341\n\" \203\257\341 \" \203\301\f\203\301\354 \f \n %\202\310\354\355\211\211\211\313%.\207" [date zone time day month year text-properties-at 0 next-property-change copy-sequence set-text-properties nil "" string-match "\\([0-9]+\\)[ ]+\\([^ ,]+\\)[ ]+\\([0-9]+\\)[ ]+\\([0-9]+:[0-9:]+\\)[ ]+\\([-+a-zA-Z0-9]+\\)" 3 2 1 4 5 "\\([0-9]+\\)[ ]+\\([^ ,]+\\)[ ]+\\([0-9]+\\)[ ]+\\([0-9]+:[0-9:]+\\)[ ]*\\'" "\\([^ ,]+\\),[ ]+\\([0-9]+\\)[ ]+\\([^ ,]+\\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string timezone-months-assoc monthnum] 7 (#$ . 3597)]) #@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) "\206\304\305\211\211\306\307\"\203\310\311\312\202I\306\313\"\203,\310\311\305\202I\306\314\"\203<\310\311\312\202I\306\315\"\203I\310\311\305\316 \203U\317 \"\202V\320\n\203a\317\n\"\202b\320 \203m\317 \"\202n\320#,\207" [time second minute hour "" nil 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 match-string "0"] 6 (#$ . 6898)]) #@187 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) ":\203\n@\304\245\207\203>\305\226 \"A\206\211;\203\"\306!\307!\304\n\310\245_\n\310\246\\\311W\203; [\202< *\207\311\207" [timezone timezone-world-timezones abszone minutes 60 assoc string-to-number abs 100 0] 4 (#$ . 7584)]) #@291 Compute the UTC time equivalent to DATE at time SECONDS after midnight. Return a Lisp timestamp 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) "\306 Z\307\n _\3101\311\f \"0\202\210\312,\207" [current-time-origin date days seconds-per-day day-seconds seconds 719163 86400 (range-error) time-add nil] 3 (#$ . 8071)]) #@287 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) "\304\305!\205\306 \"\211\205\305\n!\211@\205 ))\207" [date seconds utc-time zone fboundp current-time-zone timezone-time-from-absolute] 4 (#$ . 8606)]) #@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) "\306!\307\310H!\211\311W\203 \312\\\202/ \313W\203\" \314\\\202/ \315W\203. \314\\\202/ \307\316H!\307\317H!\320\321H!\307\f\310H!\307\f\316H!\307\f\317H!\322H\206^\206w\323\324\n #\325\325 _\\_\\\"\326!\326!Z  \\\327\325\"! !\\\325!_Z\330 X\203\311 \330Z T\331\n \" W\203\357\nT\316\332\nW\203\357\316 T\202\357\310 V\203\357 \330\\ S\316 V\203\357\nS\316\nV\203\352\332 S\331\n \"\333 \n &.\207" [date year month day time hour timezone-parse-date string-to-number 0 69 2000 100 1900 1000 1 2 timezone-parse-time 3 4 timezone-time-zone-from-absolute timezone-absolute-from-gregorian 60 timezone-zone-to-minute floor 24 timezone-last-day-of-month 12 vector minute second local timezone diff hour-fix] 9 (#$ . 9122)]) #@36 The last day in MONTH during YEAR. (defalias 'timezone-last-day-of-month #[(month year) "\302U\203\303 !\203\304\207\305SH\207" [month year 2 timezone-leap-year-p 29 [31 28 31 30 31 30 31 31 30 31 30 31]] 2 (#$ . 10147)]) #@44 Return t if YEAR is a Gregorian leap year. (defalias 'timezone-leap-year-p #[(year) "\301\246\302U\203\303\246\302U?\206\304\246\302U\207" [year 4 0 100 400] 2 (#$ . 10381)]) #@67 Return the day number within the year of the date month/day/year. (defalias 'timezone-day-number #[(month day year) "\304 S_\\ \305V\203 \n\306\307 _\\\310\245Z\311 !\203 \nT\n)\207" [day month day-of-year year 31 2 23 4 10 timezone-leap-year-p] 4 (#$ . 10569)]) #@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) "\303\304 \n#\305\nS_\nS\306\245\nS\307\245[\nS\310\245%\207" [month day year + timezone-day-number 365 4 100 400] 7 (#$ . 10845)]) (provide 'timezone)