bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#23600: 25.1.50; encode-time returns wrong result


From: Kazuhiro Ito
Subject: bug#23600: 25.1.50; encode-time returns wrong result
Date: Sun, 05 Jun 2016 20:08:22 +0900
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (Goj┼Ź) APEL/10.8 EasyPG/1.0.0 Emacs/25.1.50 (x86_64-w64-mingw32) MULE/6.0 (HANACHIRUSATO)

> > Thank you for the fix.  The problem I showed in the bug report seems
> > to be resolved.
> Thanks, I installed the fix in master.

Thank you.

> > But there still be a problem related timezone (I
> > dont' know whether it is the same problem).  With your patch, the
> > below code returns unexpected result.
> > 
> > (list (progn (set-time-zone-rule 0)
> >          (current-time-zone))
> >        (progn (set-time-zone-rule "JST-9")
> >          (current-time-zone))
> >        (progn (set-time-zone-rule "<JST>-9")
> >          (current-time-zone)))
> > 
> > -> ((0 "ZZZ") (0 "ZZZ") (32400 "JST"))
> > 
> > I want it to return '((0 "ZZZ") (32400 "JST") (32400 "JST"))'.
> Yes, that's the correct result and it's what I observe on Ubuntu 16.04
> x86-64. I don't offhand see how the just-installed patch would cause the
> wrong answer for the "JST-9" case, as the patch cannot make a difference
> unless TZ's value starts with "<".
> 
> Do you see the same (wrong) behavior for "JST-9" in the emacs-25 branch?
> In Emacs 24.5?

Emacs 24.5 can treat "JST-9" correctly but not for "<JST-9>",
emacs-25 shows the same result as trunk.

(list
  (progn (set-time-zone-rule "<AAA>-1")
         (current-time-zone))
  (progn (set-time-zone-rule t)
         (current-time-zone))
  (progn (set-time-zone-rule "BBB-2")
         (current-time-zone))
  (progn (set-time-zone-rule 36000)
         (current-time-zone))
  (progn (set-time-zone-rule "<JST>-9")
         (current-time-zone)))

emacs-25 branch
-> ((32400 "JST") (0 "GMT") (32400 "JST") (32400 "JST") (32400 "JST"))

emacs-25 branch with sys_putenv patch and trunk
-> ((3600 "AAA") (0 "GMT") (3600 "AAA") (36000 "ZZZ") (32400 "JST"))


(list (progn (set-time-zone-rule "GMT0")
             (current-time-zone))
      (progn (set-time-zone-rule "BBB-2")
             (current-time-zone))
      (progn (set-time-zone-rule "<JST>-9")
             (current-time-zone)))

24.5 pre-built binary
-> ((0 "GMT") (7200 "BBB") (3600 "T>-"))

-- 
Kazuhiro Ito





reply via email to

[Prev in Thread] Current Thread [Next in Thread]