date

View: New views
5 Messages — Rating Filter:   Alert me  

date

by Escarrilla, Harold :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

/u/hescarri 29$ date -d"2009-10-30 + 3 days"
Sun Nov  1 23:00:00 EST 2009

It should be Nov 2.


Harold Escarrilla
Morgan Stanley | Technology & Data
1 New York Plaza, 12th Floor | New York, NY  10004
Phone: +1 212 276-3206
Harold.Escarrilla@...


--------------------------------------------------------------------------
NOTICE: If received in error, please destroy, and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error. We may monitor and store emails to the extent permitted by applicable law.

Re: date

by Bob Proulx :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Escarrilla, Harold wrote:
> /u/hescarri 29$ date -d"2009-10-30 + 3 days"
> Sun Nov  1 23:00:00 EST 2009
>
> It should be Nov 2.

What version of date are you using?

  date --version

I cannot recreate this behavior with a recent version of date.

  $ date -d"2009-10-30 + 3 days"
  Mon Nov  2 00:00:00 MST 2009

Bob



Re: date

by Philip Rowlands :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, 2 Nov 2009, Escarrilla, Harold wrote:

> /u/hescarri 29$ date -d"2009-10-30 + 3 days"
> Sun Nov  1 23:00:00 EST 2009
>
> It should be Nov 2.

I can't reproduce this, but it can't be a coincidence that daylight
saving rules switched last weekend in America/New_York, and the given
query spans the transition.

By giving an explicit time-of-day can you narrow down where the
problem occurs? e.g.

$ date -d"01:00 2009-10-31 + 2 days"


Cheers,
Phil



RE: date

by Escarrilla, Harold :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

$ date --version
date (coreutils) 5.2.1
Written by David MacKenzie.

Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE



Harold Escarrilla
Morgan Stanley | Technology & Data
1 New York Plaza, 12th Floor | New York, NY  10004
Phone: +1 212 276-3206
Harold.Escarrilla@...

-----Original Message-----
From: Bob Proulx [mailto:bob@...]
Sent: Tuesday, November 03, 2009 2:51 AM
To: Escarrilla, Harold (IT)
Cc: bug-coreutils@...
Subject: Re: date

Escarrilla, Harold wrote:
> /u/hescarri 29$ date -d"2009-10-30 + 3 days"
> Sun Nov  1 23:00:00 EST 2009
>
> It should be Nov 2.

What version of date are you using?

  date --version

I cannot recreate this behavior with a recent version of date.

  $ date -d"2009-10-30 + 3 days"
  Mon Nov  2 00:00:00 MST 2009

Bob

--------------------------------------------------------------------------
NOTICE: If received in error, please destroy, and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error. We may monitor and store emails to the extent permitted by applicable law.



Re: date

by Bob Proulx :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Escarrilla, Harold wrote:
> $ date --version
> date (coreutils) 5.2.1

The NEWS entry for 6.0 (2006-08-15) lists this:

  date: a command like date -d '2006-04-23 21 days ago' would print
  the wrong date in some time zones.  (see the test for an example)

I checked an old 6.10 version and could not recreate the problem.  It
looks like the problem you are seeing has been addressed in a newer
version.

Bob