diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2019-08-16 22:09:04 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2019-08-16 23:25:07 -0700 |
commit | 37257d6acadff17bd1e52cfa460950bcb684c5c3 (patch) | |
tree | ab7088cfa725561c8456f388cff79466948b3532 /test/lisp/calendar | |
parent | d7c9ed8445d13de7350be3360d68717362f89929 (diff) | |
download | emacs-37257d6acadff17bd1e52cfa460950bcb684c5c3.tar.gz |
More-compatible subsecond calendrical timestamps
Instead of appending a subseconds member to the result of
‘decode-time’, this keeps the format unchanged unless you give
a new optional argument to ‘decode-time’. Also, the augmented
format now puts the subsecond info in the SECONDS element, so
the total number of elements is unchanged; this is more
compatible with code that expects the traditional 9 elements,
such as ‘(pcase decoded-time (`(,SEC ,MIN ,HOUR ,DAY ,MON
,YEAR ,DOW ,DST ,ZONE) ...) ...)’.
* doc/lispref/os.texi, doc/misc/emacs-mime.texi, etc/NEWS:
* lisp/net/soap-client.el (soap-decode-date-time):
* lisp/simple.el (decoded-time):
Document the new behavior.
* lisp/calendar/icalendar.el (icalendar--decode-isodatetime):
* lisp/calendar/iso8601.el (iso8601-parse)
(iso8601-parse-time, iso8601-parse-duration)
(iso8601--decoded-time):
* lisp/calendar/parse-time.el (parse-time-string):
* lisp/calendar/time-date.el (decoded-time-add)
(decoded-time--alter-second):
* lisp/org/org.el (org-parse-time-string):
* lisp/simple.el (decoded-time):
* src/timefns.c (Fdecode_time, Fencode_time):
* test/lisp/calendar/icalendar-tests.el:
(icalendar--decode-isodatetime):
* test/lisp/calendar/iso8601-tests.el (test-iso8601-date-years)
(test-iso8601-date-dates, test-iso8601-date-obsolete)
(test-iso8601-date-weeks, test-iso8601-date-ordinals)
(test-iso8601-time, test-iso8601-combined)
(test-iso8601-duration, test-iso8601-intervals)
(standard-test-dates, standard-test-time-of-day-fractions)
(standard-test-time-of-day-beginning-of-day)
(standard-test-time-of-day-utc)
(standard-test-time-of-day-zone)
(standard-test-date-and-time-of-day, standard-test-interval):
* test/lisp/calendar/parse-time-tests.el (parse-time-tests):
* test/src/timefns-tests.el (format-time-string-with-zone)
(encode-time-dst-numeric-zone):
Revert recent changes that added a SUBSECS member to
calendrical timestamps, since that component is no longer
present (the info, if any, is now in the SECONDS member).
* lisp/calendar/time-date.el (decoded-time-add)
(decoded-time--alter-second):
Support fractional seconds in the new form. Simplify.
* src/timefns.c (Fdecode_time): Support new arg FORM.
(Fencode_time): Support subsecond resolution.
* test/src/timefns-tests.el (format-time-string-with-zone)
(decode-then-encode-time): Test subsecond calendrical timestamps.
Diffstat (limited to 'test/lisp/calendar')
-rw-r--r-- | test/lisp/calendar/icalendar-tests.el | 8 | ||||
-rw-r--r-- | test/lisp/calendar/iso8601-tests.el | 190 | ||||
-rw-r--r-- | test/lisp/calendar/parse-time-tests.el | 18 |
3 files changed, 108 insertions, 108 deletions
diff --git a/test/lisp/calendar/icalendar-tests.el b/test/lisp/calendar/icalendar-tests.el index 060cd8c9091..baea4804045 100644 --- a/test/lisp/calendar/icalendar-tests.el +++ b/test/lisp/calendar/icalendar-tests.el @@ -477,18 +477,18 @@ END:VEVENT ;; testcase: no time zone in input -> keep time as is ;; 1 Jan 2013 10:00 - (should (equal '(0 0 10 1 1 2013 2 nil 7200 0) + (should (equal '(0 0 10 1 1 2013 2 nil 7200) (icalendar--decode-isodatetime "20130101T100000"))) ;; 1 Aug 2013 10:00 (DST) - (should (equal '(0 0 10 1 8 2013 4 t 10800 0) + (should (equal '(0 0 10 1 8 2013 4 t 10800) (icalendar--decode-isodatetime "20130801T100000"))) ;; testcase: UTC time zone specifier in input -> convert to local time ;; 31 Dec 2013 23:00 UTC -> 1 Jan 2013 01:00 EET - (should (equal '(0 0 1 1 1 2014 3 nil 7200 0) + (should (equal '(0 0 1 1 1 2014 3 nil 7200) (icalendar--decode-isodatetime "20131231T230000Z"))) ;; 1 Aug 2013 10:00 UTC -> 1 Aug 2013 13:00 EEST - (should (equal '(0 0 13 1 8 2013 4 t 10800 0) + (should (equal '(0 0 13 1 8 2013 4 t 10800) (icalendar--decode-isodatetime "20130801T100000Z"))) ) diff --git a/test/lisp/calendar/iso8601-tests.el b/test/lisp/calendar/iso8601-tests.el index 3f1149c864d..35c319ed036 100644 --- a/test/lisp/calendar/iso8601-tests.el +++ b/test/lisp/calendar/iso8601-tests.el @@ -24,65 +24,65 @@ (ert-deftest test-iso8601-date-years () (should (equal (iso8601-parse-date "1985") - '(nil nil nil nil nil 1985 nil nil nil nil))) + '(nil nil nil nil nil 1985 nil nil nil))) (should (equal (iso8601-parse-date "-0003") - '(nil nil nil nil nil -4 nil nil nil nil))) + '(nil nil nil nil nil -4 nil nil nil))) (should (equal (iso8601-parse-date "+1985") - '(nil nil nil nil nil 1985 nil nil nil nil)))) + '(nil nil nil nil nil 1985 nil nil nil)))) (ert-deftest test-iso8601-date-dates () (should (equal (iso8601-parse-date "1985-03-14") - '(nil nil nil 14 3 1985 nil nil nil nil))) + '(nil nil nil 14 3 1985 nil nil nil))) (should (equal (iso8601-parse-date "19850314") - '(nil nil nil 14 3 1985 nil nil nil nil))) + '(nil nil nil 14 3 1985 nil nil nil))) (should (equal (iso8601-parse-date "1985-02") - '(nil nil nil nil 2 1985 nil nil nil nil)))) + '(nil nil nil nil 2 1985 nil nil nil)))) (ert-deftest test-iso8601-date-obsolete () (should (equal (iso8601-parse-date "--02-01") - '(nil nil nil 1 2 nil nil nil nil nil))) + '(nil nil nil 1 2 nil nil nil nil))) (should (equal (iso8601-parse-date "--0201") - '(nil nil nil 1 2 nil nil nil nil nil)))) + '(nil nil nil 1 2 nil nil nil nil)))) (ert-deftest test-iso8601-date-weeks () (should (equal (iso8601-parse-date "2008W39-6") - '(nil nil nil 27 9 2008 nil nil nil nil))) + '(nil nil nil 27 9 2008 nil nil nil))) (should (equal (iso8601-parse-date "2009W01-1") - '(nil nil nil 29 12 2008 nil nil nil nil))) + '(nil nil nil 29 12 2008 nil nil nil))) (should (equal (iso8601-parse-date "2009W53-7") - '(nil nil nil 3 1 2010 nil nil nil nil)))) + '(nil nil nil 3 1 2010 nil nil nil)))) (ert-deftest test-iso8601-date-ordinals () (should (equal (iso8601-parse-date "1981-095") - '(nil nil nil 5 4 1981 nil nil nil nil)))) + '(nil nil nil 5 4 1981 nil nil nil)))) (ert-deftest test-iso8601-time () (should (equal (iso8601-parse-time "13:47:30") - '(30 47 13 nil nil nil nil nil nil 0))) + '(30 47 13 nil nil nil nil nil nil))) (should (equal (iso8601-parse-time "134730") - '(30 47 13 nil nil nil nil nil nil 0))) + '(30 47 13 nil nil nil nil nil nil))) (should (equal (iso8601-parse-time "1347") - '(0 47 13 nil nil nil nil nil nil 0)))) + '(0 47 13 nil nil nil nil nil nil)))) (ert-deftest test-iso8601-combined () (should (equal (iso8601-parse "2008-03-02T13:47:30") - '(30 47 13 2 3 2008 nil nil nil 0))) + '(30 47 13 2 3 2008 nil nil nil))) (should (equal (iso8601-parse "2008-03-02T13:47:30Z") - '(30 47 13 2 3 2008 nil nil 0 0))) + '(30 47 13 2 3 2008 nil nil 0))) (should (equal (iso8601-parse "2008-03-02T13:47:30+01:00") - '(30 47 13 2 3 2008 nil nil 3600 0))) + '(30 47 13 2 3 2008 nil nil 3600))) (should (equal (iso8601-parse "2008-03-02T13:47:30-01") - '(30 47 13 2 3 2008 nil nil -3600 0)))) + '(30 47 13 2 3 2008 nil nil -3600)))) (ert-deftest test-iso8601-duration () (should (equal (iso8601-parse-duration "P3Y6M4DT12H30M5S") - '(5 30 12 4 6 3 nil nil nil 0))) + '(5 30 12 4 6 3 nil nil nil))) (should (equal (iso8601-parse-duration "P1M") - '(0 0 0 0 1 0 nil nil nil 0))) + '(0 0 0 0 1 0 nil nil nil))) (should (equal (iso8601-parse-duration "PT1M") - '(0 1 0 0 0 0 nil nil nil 0))) + '(0 1 0 0 0 0 nil nil nil))) (should (equal (iso8601-parse-duration "P0003-06-04T12:30:05") - '(5 30 12 4 6 3 nil nil nil 0)))) + '(5 30 12 4 6 3 nil nil nil)))) (ert-deftest test-iso8601-invalid () (should-not (iso8601-valid-p " 2008-03-02T13:47:30-01")) @@ -94,149 +94,149 @@ (ert-deftest test-iso8601-intervals () (should (equal (iso8601-parse-interval "2007-03-01T13:00:00Z/2008-05-11T15:30:00Z") - '((0 0 13 1 3 2007 nil nil 0 0) - (0 30 15 11 5 2008 nil nil 0 0) + '((0 0 13 1 3 2007 nil nil 0) + (0 30 15 11 5 2008 nil nil 0) ;; Hm... can't really use decode-time for time differences... - (0 30 2 14 3 1971 0 nil 0 0)))) + (0 30 2 14 3 1971 0 nil 0)))) (should (equal (iso8601-parse-interval "2007-03-01T13:00:00Z/P1Y2M10DT2H30M") - '((0 0 13 1 3 2007 nil nil 0 0) - (0 30 15 11 5 2008 nil nil 0 0) - (0 30 2 10 2 1 nil nil nil 0)))) + '((0 0 13 1 3 2007 nil nil 0) + (0 30 15 11 5 2008 nil nil 0) + (0 30 2 10 2 1 nil nil nil)))) (should (equal (iso8601-parse-interval "P1Y2M10DT2H30M/2008-05-11T15:30:00Z") - '((0 0 13 1 3 2007 nil nil 0 0) - (0 30 15 11 5 2008 nil nil 0 0) - (0 30 2 10 2 1 nil nil nil 0))))) + '((0 0 13 1 3 2007 nil nil 0) + (0 30 15 11 5 2008 nil nil 0) + (0 30 2 10 2 1 nil nil nil))))) (ert-deftest standard-test-dates () (should (equal (iso8601-parse-date "19850412") - '(nil nil nil 12 4 1985 nil nil nil nil))) + '(nil nil nil 12 4 1985 nil nil nil))) (should (equal (iso8601-parse-date "1985-04-12") - '(nil nil nil 12 4 1985 nil nil nil nil))) + '(nil nil nil 12 4 1985 nil nil nil))) (should (equal (iso8601-parse-date "1985102") - '(nil nil nil 12 4 1985 nil nil nil nil))) + '(nil nil nil 12 4 1985 nil nil nil))) (should (equal (iso8601-parse-date "1985-102") - '(nil nil nil 12 4 1985 nil nil nil nil))) + '(nil nil nil 12 4 1985 nil nil nil))) (should (equal (iso8601-parse-date "1985W155") - '(nil nil nil 12 4 1985 nil nil nil nil))) + '(nil nil nil 12 4 1985 nil nil nil))) (should (equal (iso8601-parse-date "1985-W15-5") - '(nil nil nil 12 4 1985 nil nil nil nil))) + '(nil nil nil 12 4 1985 nil nil nil))) (should (equal (iso8601-parse-date "1985W15") - '(nil nil nil 7 4 1985 nil nil nil nil))) + '(nil nil nil 7 4 1985 nil nil nil))) (should (equal (iso8601-parse-date "1985-W15") - '(nil nil nil 7 4 1985 nil nil nil nil))) + '(nil nil nil 7 4 1985 nil nil nil))) (should (equal (iso8601-parse-date "1985-04") - '(nil nil nil nil 4 1985 nil nil nil nil))) + '(nil nil nil nil 4 1985 nil nil nil))) (should (equal (iso8601-parse-date "1985") - '(nil nil nil nil nil 1985 nil nil nil nil))) + '(nil nil nil nil nil 1985 nil nil nil))) (should (equal (iso8601-parse-date "+1985-04-12") - '(nil nil nil 12 4 1985 nil nil nil nil))) + '(nil nil nil 12 4 1985 nil nil nil))) (should (equal (iso8601-parse-date "+19850412") - '(nil nil nil 12 4 1985 nil nil nil nil)))) + '(nil nil nil 12 4 1985 nil nil nil)))) (ert-deftest standard-test-time-of-day-local-time () (should (equal (iso8601-parse-time "152746") - '(46 27 15 nil nil nil nil nil nil 0))) + '(46 27 15 nil nil nil nil nil nil))) (should (equal (iso8601-parse-time "15:27:46") - '(46 27 15 nil nil nil nil nil nil 0))) + '(46 27 15 nil nil nil nil nil nil))) (should (equal (iso8601-parse-time "1528") - '(0 28 15 nil nil nil nil nil nil 0))) + '(0 28 15 nil nil nil nil nil nil))) (should (equal (iso8601-parse-time "15:28") - '(0 28 15 nil nil nil nil nil nil 0))) + '(0 28 15 nil nil nil nil nil nil))) (should (equal (iso8601-parse-time "15") - '(0 0 15 nil nil nil nil nil nil 0)))) + '(0 0 15 nil nil nil nil nil nil)))) (ert-deftest standard-test-time-of-day-fractions () ;; decoded-time doesn't support sub-second times. ;; (should (equal (iso8601-parse-time "152735,5") - ;; '(46 27 15 nil nil nil nil nil nil (5 . 10)))) + ;; '(46 27 15 nil nil nil nil nil nil))) ;; (should (equal (iso8601-parse-time "15:27:35,5") - ;; '(46 27 15 nil nil nil nil nil nil (5 . 10)))) + ;; '(46 27 15 nil nil nil nil nil nil))) ) (ert-deftest standard-test-time-of-day-beginning-of-day () (should (equal (iso8601-parse-time "000000") - '(0 0 0 nil nil nil nil nil nil 0))) + '(0 0 0 nil nil nil nil nil nil))) (should (equal (iso8601-parse-time "00:00:00") - '(0 0 0 nil nil nil nil nil nil 0))) + '(0 0 0 nil nil nil nil nil nil))) (should (equal (iso8601-parse-time "0000") - '(0 0 0 nil nil nil nil nil nil 0))) + '(0 0 0 nil nil nil nil nil nil))) (should (equal (iso8601-parse-time "00:00") - '(0 0 0 nil nil nil nil nil nil 0)))) + '(0 0 0 nil nil nil nil nil nil)))) (ert-deftest standard-test-time-of-day-utc () (should (equal (iso8601-parse-time "232030Z") - '(30 20 23 nil nil nil nil nil 0 0))) + '(30 20 23 nil nil nil nil nil 0))) (should (equal (iso8601-parse-time "23:20:30Z") - '(30 20 23 nil nil nil nil nil 0 0))) + '(30 20 23 nil nil nil nil nil 0))) (should (equal (iso8601-parse-time "2320Z") - '(0 20 23 nil nil nil nil nil 0 0))) + '(0 20 23 nil nil nil nil nil 0))) (should (equal (iso8601-parse-time "23:20Z") - '(0 20 23 nil nil nil nil nil 0 0))) + '(0 20 23 nil nil nil nil nil 0))) (should (equal (iso8601-parse-time "23Z") - '(0 0 23 nil nil nil nil nil 0 0)))) + '(0 0 23 nil nil nil nil nil 0)))) (ert-deftest standard-test-time-of-day-zone () (should (equal (iso8601-parse-time "152746+0100") - '(46 27 15 nil nil nil nil nil 3600 0))) + '(46 27 15 nil nil nil nil nil 3600))) (should (equal (iso8601-parse-time "15:27:46+0100") - '(46 27 15 nil nil nil nil nil 3600 0))) + '(46 27 15 nil nil nil nil nil 3600))) (should (equal (iso8601-parse-time "152746+01") - '(46 27 15 nil nil nil nil nil 3600 0))) + '(46 27 15 nil nil nil nil nil 3600))) (should (equal (iso8601-parse-time "15:27:46+01") - '(46 27 15 nil nil nil nil nil 3600 0))) + '(46 27 15 nil nil nil nil nil 3600))) (should (equal (iso8601-parse-time "152746-0500") - '(46 27 15 nil nil nil nil nil -18000 0))) + '(46 27 15 nil nil nil nil nil -18000))) (should (equal (iso8601-parse-time "15:27:46-0500") - '(46 27 15 nil nil nil nil nil -18000 0))) + '(46 27 15 nil nil nil nil nil -18000))) (should (equal (iso8601-parse-time "152746-05") - '(46 27 15 nil nil nil nil nil -18000 0))) + '(46 27 15 nil nil nil nil nil -18000))) (should (equal (iso8601-parse-time "15:27:46-05") - '(46 27 15 nil nil nil nil nil -18000 0)))) + '(46 27 15 nil nil nil nil nil -18000)))) (ert-deftest standard-test-date-and-time-of-day () (should (equal (iso8601-parse "19850412T101530") - '(30 15 10 12 4 1985 nil nil nil 0))) + '(30 15 10 12 4 1985 nil nil nil))) (should (equal (iso8601-parse "1985-04-12T10:15:30") - '(30 15 10 12 4 1985 nil nil nil 0))) + '(30 15 10 12 4 1985 nil nil nil))) (should (equal (iso8601-parse "1985102T235030Z") - '(30 50 23 12 4 1985 nil nil 0 0))) + '(30 50 23 12 4 1985 nil nil 0))) (should (equal (iso8601-parse "1985-102T23:50:30Z") - '(30 50 23 12 4 1985 nil nil 0 0))) + '(30 50 23 12 4 1985 nil nil 0))) (should (equal (iso8601-parse "1985W155T235030") - '(30 50 23 12 4 1985 nil nil nil 0))) + '(30 50 23 12 4 1985 nil nil nil))) (should (equal (iso8601-parse "1985-W155T23:50:30") - '(30 50 23 12 4 1985 nil nil nil 0)))) + '(30 50 23 12 4 1985 nil nil nil)))) (ert-deftest standard-test-interval () ;; A time interval starting at 20 minutes and 50 seconds past 23 ;; hours on 12 April 1985 and ending at 30 minutes past 10 hours on ;; 25 June 1985. (should (equal (iso8601-parse-interval "19850412T232050Z/19850625T103000Z") - '((50 20 23 12 4 1985 nil nil 0 0) - (0 30 10 25 6 1985 nil nil 0 0) - (10 9 11 15 3 1970 0 nil 0 0)))) + '((50 20 23 12 4 1985 nil nil 0) + (0 30 10 25 6 1985 nil nil 0) + (10 9 11 15 3 1970 0 nil 0)))) (should (equal (iso8601-parse-interval "1985-04-12T23:20:50Z/1985-06-25T10:30:00Z") - '((50 20 23 12 4 1985 nil nil 0 0) - (0 30 10 25 6 1985 nil nil 0 0) - (10 9 11 15 3 1970 0 nil 0 0)))) + '((50 20 23 12 4 1985 nil nil 0) + (0 30 10 25 6 1985 nil nil 0) + (10 9 11 15 3 1970 0 nil 0)))) ;; A time interval starting at 12 April 1985 and ending on 25 June ;; 1985. @@ -251,41 +251,41 @@ ;; A time interval of 2 years, 10 months, 15 days, 10 hours, 20 ;; minutes and 30 seconds. (should (equal (iso8601-parse-duration "P2Y10M15DT10H20M30S") - '(30 20 10 15 10 2 nil nil nil 0))) + '(30 20 10 15 10 2 nil nil nil))) (should (equal (iso8601-parse-duration "P00021015T102030") - '(30 20 10 15 10 2 nil nil nil 0))) + '(30 20 10 15 10 2 nil nil nil))) (should (equal (iso8601-parse-duration "P0002-10-15T10:20:30") - '(30 20 10 15 10 2 nil nil nil 0))) + '(30 20 10 15 10 2 nil nil nil))) ;; A time interval of 1 year and 6 months. (should (equal (iso8601-parse-duration "P1Y6M") - '(0 0 0 0 6 1 nil nil nil 0))) + '(0 0 0 0 6 1 nil nil nil))) (should (equal (iso8601-parse-duration "P0001-06") - '(nil nil nil nil 6 1 nil nil nil nil))) + '(nil nil nil nil 6 1 nil nil nil))) ;; A time interval of seventy-two hours. (should (equal (iso8601-parse-duration "PT72H") - '(0 0 72 0 0 0 nil nil nil 0))) + '(0 0 72 0 0 0 nil nil nil))) ;; Defined by start and duration ;; A time interval of 1 year, 2 months, 15 days and 12 hours, ;; beginning on 12 April 1985 at 20 minutes past 23 hours. (should (equal (iso8601-parse-interval "19850412T232000/P1Y2M15DT12H") - '((0 20 23 12 4 1985 nil nil nil 0) - (0 20 11 28 6 1986 nil nil nil 0) - (0 0 12 15 2 1 nil nil nil 0)))) + '((0 20 23 12 4 1985 nil nil nil) + (0 20 11 28 6 1986 nil nil nil) + (0 0 12 15 2 1 nil nil nil)))) (should (equal (iso8601-parse-interval "1985-04-12T23:20:00/P1Y2M15DT12H") - '((0 20 23 12 4 1985 nil nil nil 0) - (0 20 11 28 6 1986 nil nil nil 0) - (0 0 12 15 2 1 nil nil nil 0)))) + '((0 20 23 12 4 1985 nil nil nil) + (0 20 11 28 6 1986 nil nil nil) + (0 0 12 15 2 1 nil nil nil)))) ;; Defined by duration and end ;; A time interval of 1 year, 2 months, 15 days and 12 hours, ending ;; on 12 April 1985 at 20 minutes past 23 hour. (should (equal (iso8601-parse-interval "P1Y2M15DT12H/19850412T232000") - '((0 20 11 28 1 1984 nil nil nil 0) - (0 20 23 12 4 1985 nil nil nil 0) - (0 0 12 15 2 1 nil nil nil 0))))) + '((0 20 11 28 1 1984 nil nil nil) + (0 20 23 12 4 1985 nil nil nil) + (0 0 12 15 2 1 nil nil nil))))) ;;; iso8601-tests.el ends here diff --git a/test/lisp/calendar/parse-time-tests.el b/test/lisp/calendar/parse-time-tests.el index 61a3838a52b..7435620b71f 100644 --- a/test/lisp/calendar/parse-time-tests.el +++ b/test/lisp/calendar/parse-time-tests.el @@ -28,23 +28,23 @@ (ert-deftest parse-time-tests () (should (equal (parse-time-string "Mon, 22 Feb 2016 19:35:42 +0100") - '(42 35 19 22 2 2016 1 -1 3600 0))) + '(42 35 19 22 2 2016 1 -1 3600))) (should (equal (parse-time-string "22 Feb 2016 19:35:42 +0100") - '(42 35 19 22 2 2016 nil -1 3600 0))) + '(42 35 19 22 2 2016 nil -1 3600))) (should (equal (parse-time-string "22 Feb 2016 +0100") - '(nil nil nil 22 2 2016 nil -1 3600 nil))) + '(nil nil nil 22 2 2016 nil -1 3600))) (should (equal (parse-time-string "Mon, 22 Feb 16 19:35:42 +0100") - '(42 35 19 22 2 2016 1 -1 3600 0))) + '(42 35 19 22 2 2016 1 -1 3600))) (should (equal (parse-time-string "Mon, 22 February 2016 19:35:42 +0100") - '(42 35 19 22 2 2016 1 -1 3600 0))) + '(42 35 19 22 2 2016 1 -1 3600))) (should (equal (parse-time-string "Mon, 22 feb 2016 19:35:42 +0100") - '(42 35 19 22 2 2016 1 -1 3600 0))) + '(42 35 19 22 2 2016 1 -1 3600))) (should (equal (parse-time-string "Monday, 22 february 2016 19:35:42 +0100") - '(42 35 19 22 2 2016 1 -1 3600 0))) + '(42 35 19 22 2 2016 1 -1 3600))) (should (equal (parse-time-string "Monday, 22 february 2016 19:35:42 PST") - '(42 35 19 22 2 2016 1 nil -28800 0))) + '(42 35 19 22 2 2016 1 nil -28800))) (should (equal (parse-time-string "Friday, 21 Sep 2018 13:47:58 PDT") - '(58 47 13 21 9 2018 5 t -25200 0))) + '(58 47 13 21 9 2018 5 t -25200))) (should (equal (format-time-string "%Y-%m-%d %H:%M:%S" (parse-iso8601-time-string "1998-09-12T12:21:54-0200") t) |