emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bastien.guerry@wikimedia.fr>
To: "Michael Käufl" <org-mode@lists.michael-kaeufl.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: Problem with org-time-stamp & co
Date: Fri, 18 Feb 2011 10:17:51 +0100	[thread overview]
Message-ID: <87fwrlg0qo.fsf@gnu.org> (raw)
In-Reply-To: <201102171615.43058.org-mode@lists.michael-kaeufl.de> ("Michael Käufl"'s message of "Thu, 17 Feb 2011 16:15:42 +0100")

[-- Attachment #1: Type: text/plain, Size: 777 bytes --]

Hi Michael,

Michael Käufl <org-mode@lists.michael-kaeufl.de> writes:

> I tried to enter a date before 01/01/1970 using “C-c .” (org-time-stamp) and 
> org replaced the year by 2011. (The same problem occurs with org-time-stamp-
> inactive and the C-u prefixed variants.)
>
> Although I guess that this is related to the unix time, which starts on 
> 01/01/1970 00:00, my lisp skills aren't good enough to let me find the 
> responsible code line.
>
> Maybe there is someone who can fix this or tell me that it's a feature, not a 
> bug;)

The attached patch allows dates before 1970.  I tested it and I didn't
see any side-effect so far -- but there must a good reason why we have 
this limitation.

Carsten, could you tell where this limitation is necessary?

Thanks,


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: org.el.patch --]
[-- Type: text/x-patch, Size: 407 bytes --]

diff --git a/lisp/org.el b/lisp/org.el
index 655d106..bdd808d 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -14667,7 +14667,6 @@ user."
 	     (nth 2 tl))
 	(setq org-time-was-given t))
     (if (< year 100) (setq year (+ 2000 year)))
-    (if (< year 1970) (setq year (nth 5 defdecode))) ; not representable
     (setq org-read-date-analyze-futurep futurep)
     (list second minute hour day month year)))

[-- Attachment #3: Type: text/plain, Size: 14 bytes --]


-- 
 Bastien

[-- Attachment #4: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

      parent reply	other threads:[~2011-02-18  9:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-17 15:15 Problem with org-time-stamp & co Michael Käufl
2011-02-17 20:15 ` Suvayu Ali
2011-02-18 14:42   ` Ian Barton
2011-02-18 14:50     ` Bastien
2011-02-18  9:17 ` Bastien [this message]

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.orgmode.org/

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

  git send-email \
    --in-reply-to=87fwrlg0qo.fsf@gnu.org \
    --to=bastien.guerry@wikimedia.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=org-mode@lists.michael-kaeufl.de \
    /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/org-mode.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).