Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 gcl (2.6.13-2) unstable; urgency=medium
 .
   * Version_2_6_14pre1
Author: Camm Maguire <camm@debian.org>

---
The information above should follow the Patch Tagging Guidelines, please
checkout https://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: (upstream|backport|vendor|other), (<patch-url>|commit:<commit-id>)
Bug: <upstream-bugtracker-url>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: (no|not-needed|<patch-forwarded-url>)
Applied-Upstream: <version>, (<commit-url>|commit:<commid-id>)
Reviewed-By: <name and email of someone who approved/reviewed the patch>
Last-Update: 2022-12-21

--- gcl-2.6.13.orig/git.tag
+++ gcl-2.6.13/git.tag
@@ -1,2 +1,2 @@
-"Version_2_6_13"
+"Version_2_6_14pre1"
 
--- gcl-2.6.13.orig/lsp/gcl_mislib.lsp
+++ gcl-2.6.13/lsp/gcl_mislib.lsp
@@ -72,8 +72,8 @@
 (mmd +md+)
 (mmd +lmd+ t)
 
-(defun decode-universal-time (ut &optional (tz (current-timezone) tzp) 
-				 &aux (dstp (unless tzp (current-dstp))) (ut (- ut (* tz 3600))))
+(defun decode-universal-time (ut &optional (tz (let ((x (current-timezone))) (if (current-dstp) (1+ x) x)) tzp)
+				 &aux (out ut)(ut (- ut (* tz 3600))))
   (declare (optimize (safety 2)))
   (check-type ut integer)
   (check-type tz rational)
@@ -81,19 +81,28 @@
    (d ut) (floor ut seconds-per-day)
    (let* ((dow (mod d 7))(y (+ 1900 (floor d 366))))
      (labels ((l (y dd &aux (lyp (leap-year-p y))(td (if lyp 366 365))(x (- d dd)))
-		 (if (< x td) (values (1+ x) y lyp) (l (1+ y) (+ dd td)))))
+		(if (< x td) (values (1+ x) y lyp) (l (1+ y) (+ dd td)))))
 	     (multiple-value-bind
 	      (d y lyp) (l y (number-of-days-from-1900 y))
 	      (let* ((l (if lyp +lmd+ +md+))
 		     (m (position d l :test '<=))
 		     (d (if (> m 0) (- d (aref l (1- m))) d)))
 		(multiple-value-bind
-		 (h ut) (floor ut 3600)
-		 (multiple-value-bind
-		  (min sec) (floor ut 60)
-		  (values sec min h d (1+ m) y dow dstp tz)))))))))
+		      (h ut) (floor ut 3600)
+		  (labels ((nsdom (d dow n) (+ (mod (- d dow 1) 7) (* (1- n) 7)))
+			   (dstp (dow d m h)
+			     (cond ((> 10 m 2))
+				   ((eql m 2) (let ((s (nsdom d dow 2))) (or (> d s) (when (= d s) (>= h 2)))))
+				   ((eql m 10) (let ((s (nsdom d dow 1))) (or (< d s) (when (= d s) (< h 1))))))))
+		    (if (unless tzp (dstp dow d m h))
+			(multiple-value-bind
+			      (s m h d o y w) (decode-universal-time out (1- tz))
+			  (values s m h d o y w t tz))
+			(multiple-value-bind
+			      (min sec) (floor ut 60)
+			  (values sec min h d (1+ m) y dow nil tz)))))))))))
 
-(defun encode-universal-time (sec min h d m y &optional (tz (current-timezone)))
+(defun encode-universal-time (sec min h d m y &optional (tz (let ((x (current-timezone))) (if (current-dstp) (1+ x) x))))
   (declare (optimize (safety 2)))
   (check-type sec (integer 0 59))
   (check-type min (integer 0 59))
--- gcl-2.6.13.orig/release
+++ gcl-2.6.13/release
@@ -1 +1 @@
-Fri Apr 22 15:51:11 UTC 2016
+Tue Dec 20 16:07:00 UTC 2022
