From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA31138; Mon, 15 Sep 2003 18:39:03 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA10426 for ; Mon, 15 Sep 2003 18:39:02 +0200 (MET DST) Received: from old.davidb.org (adsl-64-175-171-246.dsl.sndg02.pacbell.net [64.175.171.246]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h8FGcrT10708; Mon, 15 Sep 2003 18:38:56 +0200 (MET DST) Received: from davidb by old.davidb.org with local (Exim 3.36 #1 (Debian)) id 19ywN8-0004ZX-00; Mon, 15 Sep 2003 09:38:42 -0700 Date: Mon, 15 Sep 2003 09:38:42 -0700 From: David Brown To: Xavier Leroy Cc: caml-list@inria.fr, alan.schmitt@polytechnique.org Subject: Re: [Caml-list] date manipulation library Message-ID: <20030915163841.GA17530@davidb.org> References: <20030915143708.GK2354@alan-schm1p> <20030915172135.A16340@pauillac.inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030915172135.A16340@pauillac.inria.fr> User-Agent: Mutt/1.5.4i X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 caml-list:01 sept:99 2004:99 posix:01 ocaml:01 0200,:01 sep:01 unix:02 unix:02 dave:03 wrote:03 hack:03 oct:03 library:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Mon, Sep 15, 2003 at 05:21:35PM +0200, Xavier Leroy wrote: > Good old Unix.mktime could perhaps do the job. It has the ability to > correct for impossible dates, e.g. change Sept 32nd into Oct 2nd, > or 2003-13-01 into 2004-01-01. This isn't as much a gripe about ocaml as Unix/Posix. Why is there a gmtime function to split time to UTC, but no equivalent for recombining UTC time back into seconds? I guess I can pull mktime out of glibc, and hack it to do this, or perhaps play some tricks with the environment. Dave ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners