unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Bostjan Vilfan <bjvilfan@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 13982@debbugs.gnu.org
Subject: bug#13982: 24.2; Bug in function format-time-string when used under Windows
Date: Wed, 20 Mar 2013 08:56:18 +0100	[thread overview]
Message-ID: <CAAm34zqxhEa3hoJj4x-XO4Mv2pOq6j5TY-D9UfYPB2-tOA5-fQ@mail.gmail.com> (raw)
In-Reply-To: <838v5j150j.fsf@gnu.org>

On Tue, Mar 19, 2013 at 9:58 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>> Date: Tue, 19 Mar 2013 22:08:25 +0200
>> From: Bostjan Vilfan <bjvilfan@gmail.com>
>> Cc: 13982@debbugs.gnu.org
>>
>> On Tue, Mar 19, 2013 at 7:02 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>> >> Date: Tue, 19 Mar 2013 12:56:30 +0200
>> >> From: Bostjan Vilfan <bjvilfan@gmail.com>
>> >> Cc: 13982@debbugs.gnu.org
>> >>
>> >> Hello, and thanks for your message. I did as per your instructions,
>> >> and the value of
>> >>
>> >>  (format-time-string "%H:%M %z %Z")
>> >>
>> >> is "12:30 +0200 CDT" (actual local time was 11:30; so in other words
>> >> emacs thinks local time is 1 hour ahead of actual local time)
>> >>
>> >> Your remark that all your Windows machines give the correct answer
>> >> indicates that there must be some settings on my computer that is at
>> >> fault; but I have no idea what that is.
>> >
>> > I don't think there's a Windows time zone whose name is "CDT".  Can
>> > you check if you happen to have a TZ variable in the environment, and
>> > if so, what's its value?  Please look both in the Computer's
>> > Properties and in the command shell from which you invoke "emacs -Q".
>> >
>> TZ=CET-1CDT,3,-1,0,7200,10,-1,0,10800,3600
>
> That's your problem, right there: unset that variable, and Emacs will
> show the correct time.  The Windows runtime library includes
> semi-broken support for setting TZ, but it only supports the
> "CET-1CDT" part of the value, and so switches to daylight savings not
> on the date that the rest of your value provides, but uses some
> internal default dates.  See also this KB article:
>
>   http://support.microsoft.com/kb/932590
>
>> the reason I need TZ is that I still use the (quite old) RCS software.
>
> There's a newer one here:
>
>   http://sourceforge.net/projects/ezwinports/files/rcs-5.7-1-bin.zip/download
>
> I use it all the time, and never needed any TZ setting.
>
>> > Also, I asked you to tell which time zone do you see in the Date/Time
>> > dialog of your Windows system.  Right-click on the time display in the
>> > right corner of your task bar, and select "Adjust date/time".  In the
>> > dialog that pops, click "Change timezone", and tell the name of your
>> > current Windows time zone that is shown in the middle of the dialog.
>> >
>> > If the Windows time zone and the time zone given to Emacs are
>> > different, you can have all kinds of "1 hour off" problems, especially
>> > around daylight savings change date.
>> >
>> there is no abbreviation, just the following:
>>
>> (UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna
>
> This is what %Z should produce in Emacs.  And it will, after you unset
> TZ in the environment.
>
>> I hope I answered your specific questions above. There is one item
>> that comes to mind, though, which I don't know whether it is evident
>> in the data in my original error report, namely, that my system is
>> 64-bit Windows 7. I also have a 32-bit Windows 7 installation, but
>> currently I am unable to access it. As soon as I will be able to do
>> so, I will check how emacs behaves there.
>
> 32-bit vs 64-bit is not a factor here.  The problems you have happen
> because you have TZ set in the environment.

Hello,
Let me just say one huge thanks. I've also downloaded the newer
version of rcs, and hope it works.
Regards,
Bostjan





  reply	other threads:[~2013-03-20  7:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-16  8:51 bug#13982: 24.2; Bug in function format-time-string when used under Windows Bostjan Vilfan
2013-03-17 18:47 ` Eli Zaretskii
2013-03-19 10:56   ` Bostjan Vilfan
2013-03-19 17:02     ` Eli Zaretskii
2013-03-19 20:08       ` Bostjan Vilfan
2013-03-19 20:58         ` Eli Zaretskii
2013-03-20  7:56           ` Bostjan Vilfan [this message]
2013-03-20 16:57             ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAAm34zqxhEa3hoJj4x-XO4Mv2pOq6j5TY-D9UfYPB2-tOA5-fQ@mail.gmail.com \
    --to=bjvilfan@gmail.com \
    --cc=13982@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).