From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Format for timestamp export Date: Thu, 9 Apr 2009 09:37:09 +0200 Message-ID: References: <87skkle5qx.fsf@gmail.com> Mime-Version: 1.0 (Apple Message framework v930.3) Content-Type: text/plain; charset=WINDOWS-1252; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LrpTP-0005MV-Kr for emacs-orgmode@gnu.org; Thu, 09 Apr 2009 04:18:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LrpTK-0005M5-Qe for emacs-orgmode@gnu.org; Thu, 09 Apr 2009 04:18:59 -0400 Received: from [199.232.76.173] (port=50372 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LrpTK-0005M1-NG for emacs-orgmode@gnu.org; Thu, 09 Apr 2009 04:18:54 -0400 Received: from mail-fx0-f166.google.com ([209.85.220.166]:47486) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LrpTJ-0001p7-QJ for emacs-orgmode@gnu.org; Thu, 09 Apr 2009 04:18:54 -0400 Received: by fxm10 with SMTP id 10so505726fxm.42 for ; Thu, 09 Apr 2009 01:18:51 -0700 (PDT) In-Reply-To: <87skkle5qx.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Daniel Clemente Cc: mailing-list-org-mode On Apr 7, 2009, at 1:12 AM, Daniel Clemente wrote: > > Hi. Since I edit my files from different computers, each with =20 > different locales, I end up with dates like: > > > CLOCK: [2009-04-01 mi=E9 14:15]--[2009-04-01 mi=E9 14:22] =3D> 0:07 > =85 > SCHEDULED: <2009-03-26 dj 18:00> > =85 > CLOSED: [2007-11-25 So 19:05] > > =85 <2007-08-31 Fri 17:25> > > > Emacs and I can live with these localised week day names, but to =20 > external (HTML) users I would like to show dates in a custom format =20= > so that they always look the same. > > > Can I format timestamps on export? You can customize them for display, which will also transfer to exported files. Check out the variables `org-display-custom-times' and `org-time-stamp-custom-formats'. When you turn this on, you lose some of the editing capabilities for time stamps with S-cursor keys. So if you really only need it for export, you can use one of the export preprocessor hooks and change all the time stamps with a function like (untested): (add-hook 'org-export-preprocess-final-hook (lambda () (let ((org-display-custom-times t) (org-time-stamp-custom-formats '("<%m/%d/%y %a>" . "<%m/%d/%y %a %H:%M>"))) ;; customize! (goto-char (point-min)) (while (re-search-forward org-ts-regexp-both nil t) (replace-match (save-match-data (org-translate-time (match-string 0))) t t))))) HTH - Carsten > > > Thanks, > Daniel > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode