From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.help Subject: Re: efficiently viewing Unix timestamps as dates Date: Thu, 16 Dec 2010 13:26:05 -0600 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87bp4la59u.fsf@lifelogs.com> References: <87mxo9mvxm.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1292532064 22887 80.91.229.12 (16 Dec 2010 20:41:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 16 Dec 2010 20:41:04 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 16 21:40:59 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PTKdG-0007oe-O2 for geh-help-gnu-emacs@m.gmane.org; Thu, 16 Dec 2010 21:40:58 +0100 Original-Received: from localhost ([127.0.0.1]:44702 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PTKdG-0001gL-7J for geh-help-gnu-emacs@m.gmane.org; Thu, 16 Dec 2010 15:40:58 -0500 Original-Path: usenet.stanford.edu!news-xfer.nntp.sonic.net!feeder.erje.net!news2.arglkargh.de!news.albasani.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 31 Original-X-Trace: news.albasani.net 5yV/6kC6P3qz5R0jbH3PeKbvcwrhLZ8RQi0yiDvHgpxGJ6famuFn0F5Mbc3iWw+kVLaEii2GEkloMlOF1SkfwJKKVTFoQm9e4elBrswafU/gS19fYxvxzTFuBRScvoT3 Original-NNTP-Posting-Date: Thu, 16 Dec 2010 19:26:05 +0000 (UTC) X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Cancel-Lock: sha1:XAllFAAH2Vt94uLS3vNtuQHzNWg= sha1:PhpQEStoWUhqastgKJxm8vY97W4= User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) Injection-Info: news.albasani.net; logging-data="sapBno07EQSsWm9Xe68sWTCgYeHYuTCwfLM77PSFGOZ9+vtLI2NSMGdQucXL4PyL0uEECwao4Myze5u+7Yttz7dwrw8ev/1OnmyW1KdK9HcXmCkFva5sgvM1s6Qf3SMz"; mail-complaints-to="abuse@albasani.net" Original-Xref: usenet.stanford.edu gnu.emacs.help:183348 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:77599 Archived-At: On Thu, 16 Dec 2010 00:28:38 -0700 Kevin Rodgers wrote: KR> On 12/13/10 10:20 AM, Ted Zlatanov wrote: >> Is there a mode to view (not convert!) Unix timestamps as dates? KR> What is a Unix timestamp, and how is it represented in Emacs Lisp (e.g. a KR> number or string or some other data type, and in what format)? It's the number of seconds since the epoch, e.g. date '+%s' or `M-x current-time' if you combine the first two integers, or `M-x float-time' if you round it. Right now that's 1292527019 in decimal. KR> What is a date, and how is it represented in Emacs Lisp (i.e. a number or KR> string or some other data type, and in what format)? The Unix timestamp can be converted to a visual date with `format-time-string', e.g. M-: (format-time-string "%F %T" (current-time)) but the actual format string should be up to the user. Really, my question is "how do I find numbers that look like 1292527019, run a function on them, and then show the results of that function overlaid on top of the number without actually changing it in the buffer?" Thanks Ted