unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#5408: date-to-time problem
@ 2010-01-17 23:12 Lennart Borgman
  2010-01-17 23:53 ` Andreas Schwab
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Lennart Borgman @ 2010-01-17 23:12 UTC (permalink / raw)
  To: emacs-pretest-bug

Evaluating this

   (current-time-string (date-to-time "Sun Jan 17 22:39:58 2010"))

Gives

   "Sun Jan 17 23:39:58 2010"

Is not this one hour wrong?

In GNU Emacs 23.1.50.1 (i386-mingw-nt5.1.2600)
 of 2009-10-15






^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#5408: date-to-time problem
  2010-01-17 23:12 bug#5408: date-to-time problem Lennart Borgman
@ 2010-01-17 23:53 ` Andreas Schwab
  2010-01-17 23:53 ` Juanma Barranquero
  2010-01-17 23:53 ` Chong Yidong
  2 siblings, 0 replies; 17+ messages in thread
From: Andreas Schwab @ 2010-01-17 23:53 UTC (permalink / raw)
  To: Lennart Borgman; +Cc: 5408

Lennart Borgman <lennart.borgman@gmail.com> writes:

> Evaluating this
>
>    (current-time-string (date-to-time "Sun Jan 17 22:39:58 2010"))

This lacks a time zone, so GMT is assumed.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."






^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#5408: date-to-time problem
  2010-01-17 23:12 bug#5408: date-to-time problem Lennart Borgman
  2010-01-17 23:53 ` Andreas Schwab
@ 2010-01-17 23:53 ` Juanma Barranquero
  2010-01-18  0:00   ` Lennart Borgman
  2010-01-17 23:53 ` Chong Yidong
  2 siblings, 1 reply; 17+ messages in thread
From: Juanma Barranquero @ 2010-01-17 23:53 UTC (permalink / raw)
  To: Lennart Borgman; +Cc: 5408

On Mon, Jan 18, 2010 at 00:12, Lennart Borgman
<lennart.borgman@gmail.com> wrote:

> Is not this one hour wrong?

`date-to-time' calls `timezone-make-date-arpa-standard', but does not
pass it local timezone info, so it assumes GMT.

Compare

ELISP> (timezone-make-date-arpa-standard "Sun Jan 17 22:39:58 2010")
"17 Jan 2010 23:39:58 +0100"
ELISP> (timezone-make-date-arpa-standard "Sun Jan 17 22:39:58 2010" "GMT+1")
"17 Jan 2010 22:39:58 +0100"

    Juanma






^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#5408: date-to-time problem
  2010-01-17 23:12 bug#5408: date-to-time problem Lennart Borgman
  2010-01-17 23:53 ` Andreas Schwab
  2010-01-17 23:53 ` Juanma Barranquero
@ 2010-01-17 23:53 ` Chong Yidong
  2 siblings, 0 replies; 17+ messages in thread
From: Chong Yidong @ 2010-01-17 23:53 UTC (permalink / raw)
  To: Lennart Borgman; +Cc: 5408

Lennart Borgman <lennart.borgman@gmail.com> writes:

> Evaluating this
>
>    (current-time-string (date-to-time "Sun Jan 17 22:39:58 2010"))
>
> Gives
>
>    "Sun Jan 17 23:39:58 2010"
>
> Is not this one hour wrong?

Magic 8-ball says that you are living one time zone east of Greenwich.






^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#5408: date-to-time problem
  2010-01-17 23:53 ` Juanma Barranquero
@ 2010-01-18  0:00   ` Lennart Borgman
  2010-01-18 15:09     ` Juanma Barranquero
  0 siblings, 1 reply; 17+ messages in thread
From: Lennart Borgman @ 2010-01-18  0:00 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: 5408

On Mon, Jan 18, 2010 at 12:53 AM, Juanma Barranquero <lekktu@gmail.com> wrote:
> On Mon, Jan 18, 2010 at 00:12, Lennart Borgman
> <lennart.borgman@gmail.com> wrote:
>
>> Is not this one hour wrong?
>
> `date-to-time' calls `timezone-make-date-arpa-standard', but does not
> pass it local timezone info, so it assumes GMT.
>
> Compare
>
> ELISP> (timezone-make-date-arpa-standard "Sun Jan 17 22:39:58 2010")
> "17 Jan 2010 23:39:58 +0100"
> ELISP> (timezone-make-date-arpa-standard "Sun Jan 17 22:39:58 2010" "GMT+1")
> "17 Jan 2010 22:39:58 +0100"


Ok, thanks for all the answers.

But date-to-time does not say that it assumes GMT.

And current-time-string does not say it will give my local time.






^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#5408: date-to-time problem
  2010-01-18  0:00   ` Lennart Borgman
@ 2010-01-18 15:09     ` Juanma Barranquero
  2010-01-18 15:11       ` Lennart Borgman
  0 siblings, 1 reply; 17+ messages in thread
From: Juanma Barranquero @ 2010-01-18 15:09 UTC (permalink / raw)
  To: Lennart Borgman; +Cc: 5408

On Mon, Jan 18, 2010 at 01:00, Lennart Borgman
<lennart.borgman@gmail.com> wrote:

> But date-to-time does not say that it assumes GMT.

No. Perhaps it should.

> And current-time-string does not say it will give my local time.

It seems fair to default to your local timezone. Note that there's
also a `current-time-zone', so

ELISP> (current-time-zone)
(3600 "+0100")

ELISP> (current-time-zone (date-to-time "Sun Jan 17 22:39:58 2010"))
(3600 "+0100")

    Juanma






^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#5408: date-to-time problem
  2010-01-18 15:09     ` Juanma Barranquero
@ 2010-01-18 15:11       ` Lennart Borgman
  2010-01-18 15:19         ` Juanma Barranquero
  0 siblings, 1 reply; 17+ messages in thread
From: Lennart Borgman @ 2010-01-18 15:11 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: 5408

On Mon, Jan 18, 2010 at 4:09 PM, Juanma Barranquero <lekktu@gmail.com> wrote:
> On Mon, Jan 18, 2010 at 01:00, Lennart Borgman
> <lennart.borgman@gmail.com> wrote:
>
>> But date-to-time does not say that it assumes GMT.
>
> No. Perhaps it should.

Yes.

>> And current-time-string does not say it will give my local time.
>
> It seems fair to default to your local timezone. Note that there's
> also a `current-time-zone', so

It would be much more fair if it told so. That would make the
difference more obvious.

> ELISP> (current-time-zone)
> (3600 "+0100")
>
> ELISP> (current-time-zone (date-to-time "Sun Jan 17 22:39:58 2010"))
> (3600 "+0100")
>
>    Juanma
>






^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#5408: date-to-time problem
  2010-01-18 15:11       ` Lennart Borgman
@ 2010-01-18 15:19         ` Juanma Barranquero
  2010-01-18 15:26           ` Lennart Borgman
  0 siblings, 1 reply; 17+ messages in thread
From: Juanma Barranquero @ 2010-01-18 15:19 UTC (permalink / raw)
  To: Lennart Borgman; +Cc: 5408

On Mon, Jan 18, 2010 at 16:11, Lennart Borgman
<lennart.borgman@gmail.com> wrote:

> It would be much more fair if it told so. That would make the
> difference more obvious.

Doc patches welcome.

    Juanma






^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#5408: date-to-time problem
  2010-01-18 15:19         ` Juanma Barranquero
@ 2010-01-18 15:26           ` Lennart Borgman
  2010-01-18 15:41             ` Juanma Barranquero
  0 siblings, 1 reply; 17+ messages in thread
From: Lennart Borgman @ 2010-01-18 15:26 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: 5408

On Mon, Jan 18, 2010 at 4:19 PM, Juanma Barranquero <lekktu@gmail.com> wrote:
> On Mon, Jan 18, 2010 at 16:11, Lennart Borgman
> <lennart.borgman@gmail.com> wrote:
>
>> It would be much more fair if it told so. That would make the
>> difference more obvious.
>
> Doc patches welcome.

Can't you please just put in the remarks? In a case like this it is
more effective I think.






^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#5408: date-to-time problem
  2010-01-18 15:26           ` Lennart Borgman
@ 2010-01-18 15:41             ` Juanma Barranquero
  2010-01-18 16:29               ` Chong Yidong
  0 siblings, 1 reply; 17+ messages in thread
From: Juanma Barranquero @ 2010-01-18 15:41 UTC (permalink / raw)
  To: Lennart Borgman; +Cc: 5408

On Mon, Jan 18, 2010 at 16:26, Lennart Borgman
<lennart.borgman@gmail.com> wrote:

> Can't you please just put in the remarks? In a case like this it is
> more effective I think.

Remarks? If it is causing confusion to users of the functions, it
should be documented.

    Juanma






^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#5408: date-to-time problem
  2010-01-18 15:41             ` Juanma Barranquero
@ 2010-01-18 16:29               ` Chong Yidong
  2010-01-18 16:31                 ` Lennart Borgman
  2010-01-18 16:32                 ` Juanma Barranquero
  0 siblings, 2 replies; 17+ messages in thread
From: Chong Yidong @ 2010-01-18 16:29 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: 5408

Juanma Barranquero <lekktu@gmail.com> writes:

> On Mon, Jan 18, 2010 at 16:26, Lennart Borgman
> <lennart.borgman@gmail.com> wrote:
>
>> Can't you please just put in the remarks? In a case like this it is
>> more effective I think.
>
> Remarks? If it is causing confusion to users of the functions, it
> should be documented.

I think he meant "can't *you* please just put in the remarks".  Anyhow,
I've checked in the dox fixes now.






^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#5408: date-to-time problem
  2010-01-18 16:29               ` Chong Yidong
@ 2010-01-18 16:31                 ` Lennart Borgman
  2010-01-18 16:32                 ` Juanma Barranquero
  1 sibling, 0 replies; 17+ messages in thread
From: Lennart Borgman @ 2010-01-18 16:31 UTC (permalink / raw)
  To: Chong Yidong; +Cc: Juanma Barranquero, 5408

On Mon, Jan 18, 2010 at 5:29 PM, Chong Yidong <cyd@stupidchicken.com> wrote:
> Juanma Barranquero <lekktu@gmail.com> writes:
>
>> On Mon, Jan 18, 2010 at 16:26, Lennart Borgman
>> <lennart.borgman@gmail.com> wrote:
>>
>>> Can't you please just put in the remarks? In a case like this it is
>>> more effective I think.
>>
>> Remarks? If it is causing confusion to users of the functions, it
>> should be documented.
>
> I think he meant "can't *you* please just put in the remarks".  Anyhow,
> I've checked in the dox fixes now.

Yes ;-)

Thanks.






^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#5408: date-to-time problem
  2010-01-18 16:29               ` Chong Yidong
  2010-01-18 16:31                 ` Lennart Borgman
@ 2010-01-18 16:32                 ` Juanma Barranquero
  2010-01-18 16:42                   ` Lennart Borgman
  1 sibling, 1 reply; 17+ messages in thread
From: Juanma Barranquero @ 2010-01-18 16:32 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 5408

On Mon, Jan 18, 2010 at 17:29, Chong Yidong <cyd@stupidchicken.com> wrote:

> I think he meant "can't *you* please just put in the remarks".

Ah. Why would it be more effective that *I* do it, instead of doing it himself?

    Juanma






^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#5408: date-to-time problem
  2010-01-18 16:32                 ` Juanma Barranquero
@ 2010-01-18 16:42                   ` Lennart Borgman
  2010-01-18 16:45                     ` Juanma Barranquero
  0 siblings, 1 reply; 17+ messages in thread
From: Lennart Borgman @ 2010-01-18 16:42 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: Chong Yidong, 5408

On Mon, Jan 18, 2010 at 5:32 PM, Juanma Barranquero <lekktu@gmail.com> wrote:
> On Mon, Jan 18, 2010 at 17:29, Chong Yidong <cyd@stupidchicken.com> wrote:
>
>> I think he meant "can't *you* please just put in the remarks".
>
> Ah. Why would it be more effective that *I* do it, instead of doing it himself?

Logistics. I do not commit anything.






^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#5408: date-to-time problem
  2010-01-18 16:42                   ` Lennart Borgman
@ 2010-01-18 16:45                     ` Juanma Barranquero
  2010-01-18 16:47                       ` Lennart Borgman
  0 siblings, 1 reply; 17+ messages in thread
From: Juanma Barranquero @ 2010-01-18 16:45 UTC (permalink / raw)
  To: Lennart Borgman; +Cc: Chong Yidong, 5408

On Mon, Jan 18, 2010 at 17:42, Lennart Borgman
<lennart.borgman@gmail.com> wrote:

> Logistics. I do not commit anything.

AFAIK, you have commit rights, so not commiting anything makes things
more effective for you, less effective for others.

    Juanma






^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#5408: date-to-time problem
  2010-01-18 16:45                     ` Juanma Barranquero
@ 2010-01-18 16:47                       ` Lennart Borgman
  2010-01-18 16:56                         ` Juanma Barranquero
  0 siblings, 1 reply; 17+ messages in thread
From: Lennart Borgman @ 2010-01-18 16:47 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: Chong Yidong, 5408

On Mon, Jan 18, 2010 at 5:45 PM, Juanma Barranquero <lekktu@gmail.com> wrote:
> On Mon, Jan 18, 2010 at 17:42, Lennart Borgman
> <lennart.borgman@gmail.com> wrote:
>
>> Logistics. I do not commit anything.
>
> AFAIK, you have commit rights, so not commiting anything makes things
> more effective for you, less effective for others.

My conclusion have been that I make it more effective for us all if I
do not commit. ;-)

But I will try to change my mind.






^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#5408: date-to-time problem
  2010-01-18 16:47                       ` Lennart Borgman
@ 2010-01-18 16:56                         ` Juanma Barranquero
  0 siblings, 0 replies; 17+ messages in thread
From: Juanma Barranquero @ 2010-01-18 16:56 UTC (permalink / raw)
  To: Lennart Borgman; +Cc: Chong Yidong, 5408

On Mon, Jan 18, 2010 at 17:47, Lennart Borgman
<lennart.borgman@gmail.com> wrote:

> My conclusion have been that I make it more effective for us all if I
> do not commit. ;-)

Well, IMHO, if you want something changed and don't want to commit,
you can at least send patches and ChangeLog entries.

    Juanma






^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2010-01-18 16:56 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-17 23:12 bug#5408: date-to-time problem Lennart Borgman
2010-01-17 23:53 ` Andreas Schwab
2010-01-17 23:53 ` Juanma Barranquero
2010-01-18  0:00   ` Lennart Borgman
2010-01-18 15:09     ` Juanma Barranquero
2010-01-18 15:11       ` Lennart Borgman
2010-01-18 15:19         ` Juanma Barranquero
2010-01-18 15:26           ` Lennart Borgman
2010-01-18 15:41             ` Juanma Barranquero
2010-01-18 16:29               ` Chong Yidong
2010-01-18 16:31                 ` Lennart Borgman
2010-01-18 16:32                 ` Juanma Barranquero
2010-01-18 16:42                   ` Lennart Borgman
2010-01-18 16:45                     ` Juanma Barranquero
2010-01-18 16:47                       ` Lennart Borgman
2010-01-18 16:56                         ` Juanma Barranquero
2010-01-17 23:53 ` Chong Yidong

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).