emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: Achim Gratz <Stromeko@nexgo.de>, nicholas dokos <nicholas.dokos@hp.com>
Cc: Emacs Org mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: dates before 1970
Date: Tue, 15 Mar 2011 08:24:24 +0100	[thread overview]
Message-ID: <6D45BFD1-141E-462D-8D84-D38B640E78BB@gmail.com> (raw)
In-Reply-To: <874o75a7vh.fsf@Rainer.invalid>


On Mar 14, 2011, at 7:12 PM, Achim Gratz wrote:

> Nick Dokos <nicholas.dokos@hp.com> writes:
>> I was referring to the C code implementing current-time (which, btw, has been
>> changed in latest):
>> 
>> ,----
>> | DEFUN ("current-time", Fcurrent_time, Scurrent_time, 0, 0, 0,
>> |        doc: /* Return the current time, as the number of seconds since 1970-01-01 00:00:00.
>> | The time is returned as a list of three integers.  The first has the
>> | most significant 16 bits of the seconds, while the second has the
>> | least significant 16 bits.  The third integer gives the microsecond
>> | count.
>> | 
>> | The microsecond count is zero on systems that do not provide
>> | resolution finer than a second.  */)
>> |   (void)
>> | {
>> |   EMACS_TIME t;
>> | 
>> |   EMACS_GET_TIME (t);
>> |   return list3 (make_number ((EMACS_SECS (t) >> 16) & 0xffff),
>> | 		make_number ((EMACS_SECS (t) >> 0)  & 0xffff),
>> | 		make_number (EMACS_USECS (t)));
>> | }
>> `----
> 
> I can't see how this code works correctly unless it is guaranteed that
> EMACS_TIME is 32bit unsigned...

Yes, I agree.  However, I am just realizing that using 32 bit unsigned
for (current-time) is fine for a loong time to come.  So the issue
if *Org* can handle dates outside the safe range is is not about
`current-time' at all, but about what encode-time, decode-time,
time-subtract, time-add etc do, what kind of integers they can handle.

- Carsten

> 
> 
> Achim.
> -- 
> +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
> 
> Waldorf MIDI Implementation & additional documentation:
> http://Synth.Stromeko.net/Downloads.html#WaldorfDocs
> 
> 

- Carsten

  reply	other threads:[~2011-03-15  7:24 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-10 21:00 dates before 1970 Eric S Fraga
2011-03-10 23:06 ` Nick Dokos
2011-03-11  8:31   ` Bastien
2011-03-11  8:52     ` Carsten Dominik
2011-03-13  7:39     ` Carsten Dominik
2011-03-13 20:08       ` Eric S Fraga
2011-03-14  7:40         ` Carsten Dominik
2011-03-14  9:58           ` Bastien
2011-03-11  8:47   ` Eric S Fraga
2011-03-11 11:36     ` Carsten Dominik
2011-03-11 12:00       ` Eric S Fraga
2011-03-11 15:28         ` Carsten Dominik
2011-03-11 17:56           ` Gregor Zattler
2011-03-12 22:38           ` Robert Horn
2011-03-11 16:30       ` Nick Dokos
2011-03-14 10:21         ` Carsten Dominik
2011-03-14 15:11           ` Nick Dokos
2011-03-14 17:02             ` Carsten Dominik
2011-03-14 17:13               ` Nick Dokos
2011-03-14 18:12                 ` Achim Gratz
2011-03-15  7:24                   ` Carsten Dominik [this message]
2011-03-11 16:16     ` Nick Dokos

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=6D45BFD1-141E-462D-8D84-D38B640E78BB@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=Stromeko@nexgo.de \
    --cc=emacs-orgmode@gnu.org \
    --cc=nicholas.dokos@hp.com \
    /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).