problem with time-stamps on GNU/Linux and Windows
  Home FAQ Contact Sign in
gnu.emacs.help only
 
Advanced search
POPULAR GROUPS

more...

gnu.emacs.help Profile…
 Up
problem with time-stamps on GNU/Linux and Windows         


Author: Seweryn Kokot
Date: Sep 4, 2008 04:02

Hello,

Could you explain to me why I get slightly different time-stamps under
Windows and Linux?

This is what I get in Linux

2008-08-19 wto 07:26

and under Windows I get

2008-08-05 Wt 11:44

Namely the problem is with %%a - abbreviated day of week.

Here are the settings under Linux:

(locale-info 'codeset): "ISO-8859-2"
locale-coding-system: iso-latin-2

and under Windows I have

locale-coding-system: iso-latin-2
system-time-locale: iso-latin-2
system-message-locale: iso-latin-2
(locale-info 'codeset): "cp1250"

Under Linux iso-latin-2 is set by default and on Windows I have to put
the following in .emacs file
Show full article (1.08Kb)
7 Comments
Re: problem with time-stamps on GNU/Linux and Windows         


Author: Jason Rumney
Date: Sep 4, 2008 06:00

On Sep 4, 7:02 pm, Seweryn Kokot wrote:
> Hello,
>
> Could you explain to me why I get slightly different time-stamps under
> Windows and Linux?

These localized weekday names come from the system. No amount of
configuration within Emacs will make them the same in Windows as they
are in GNU/Linux.
no comments
Re: problem with time-stamps on GNU/Linux and Windows         


Author: ken
Date: Sep 4, 2008 10:27

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/04/2008 09:00 AM Jason Rumney wrote:
> On Sep 4, 7:02 pm, Seweryn Kokot wrote:
>> Hello,
>>
>> Could you explain to me why I get slightly different time-stamps under
>> Windows and Linux?
>
> These localized weekday names come from the system. No amount of
> configuration within Emacs will make them the same in Windows as they
> are in GNU/Linux.

I'm not quite understanding your problem. And I don't often use
Windows. But I would think that emacs should fetch the same couple
words (i.e., two bytes) representing the time regardless of which OS it
is running on. But I'm guessing that the problem isn't the accuracy of
the time, but rather the human-readable output derived from those words.

I trust that you've read and understand the help on
"format-time-string"... i.e.,
Show full article (1.25Kb)
no comments
Re: problem with time-stamps on GNU/Linux and Windows         


Author: Eli Zaretskii
Date: Sep 4, 2008 10:43

> Date: Thu, 04 Sep 2008 13:27:00 -0400
> From: ken mousecar.com>
> Cc: Help-gnu-emacs@gnu.org
>
>>> Could you explain to me why I get slightly different time-stamps under
>>> Windows and Linux?
>>
>> These localized weekday names come from the system. No amount of
>> configuration within Emacs will make them the same in Windows as they
>> are in GNU/Linux.
>
> I'm not quite understanding your problem. And I don't often use
> Windows. But I would think that emacs should fetch the same couple
> words (i.e., two bytes) representing the time regardless of which OS it
> is running on.

The problem is not the time, but the abbreviated name of the second
day of the week ("Tue" in English). These abbreviated names come from
a call to a library function, which are different on Windows and on
GNU/Linux, so they return different strings.
Show full article (1.10Kb)
no comments
Re: problem with time-stamps on GNU/Linux and Windows         


Author: Seweryn Kokot
Date: Sep 4, 2008 11:19

ken mousecar.com> writes:
> On 09/04/2008 09:00 AM Jason Rumney wrote:
>> On Sep 4, 7:02 pm, Seweryn Kokot wrote:
>>> Hello,
>>>
>>> Could you explain to me why I get slightly different time-stamps under
...
Show full article (1.23Kb)
no comments
Re: problem with time-stamps on GNU/Linux and Windows         


Author: Seweryn Kokot
Date: Sep 4, 2008 11:37

Eli Zaretskii gnu.org> writes:
>>>> Could you explain to me why I get slightly different time-stamps under
>>>> Windows and Linux?
>>>
>>> These localized weekday names come from the system. No amount of
>>> configuration within...
Show full article (1.78Kb)
no comments
Re: problem with time-stamps on GNU/Linux and Windows         


Author: Seweryn Kokot
Date: Sep 4, 2008 12:55

ken mousecar.com> writes:
> All I can say is that we're working with open source code. It took a
> little bit of time, but I just tracked down at least one place where the
> dayname strings are defined. On my system it's
>
> (defvar calendar-day-name-array
> ["Sunday" "Monday" "Tuesday" "Wednesday" "Thursday" "Friday" "Saturday"]
> "Array of capitalized strings giving, in order, the day names.")
>
> (and apparently other places) in calendar.el.
>
> I.e., just go in and change the names of the days to what you want.
>
>
> Tell us if that does it... I'd be interested.
>
> hth,
> ken
Show full article (0.83Kb)
no comments
Re: problem with time-stamps on GNU/Linux and Windows         


Author: Giorgos Keramidas
Date: Sep 4, 2008 17:38

On Thu, 04 Sep 2008 20:37:26 +0200, Seweryn Kokot wrote:
> Well, (current-time-string) function returns the same strings on both
> systems, but in English, for example: "Thu Sep 4 20:16:51 2008". BTW
> why this function gives abbreviations in English and not the locale's
> ones?

Because this way the output is predictably formatted, and programs can
read it with a well-known, predefined format. The `format-time-string'
function can be used for locale-aware results.
Show full article (1.84Kb)
no comments