# [OS X TeX] Re: Save date-time, not Print date

Maarten Sneep maarten.sneep at xs4all.nl
Sat Jan 6 12:54:10 EST 2007

```On 6-jan-2007, at 18:20, Robert Bruner wrote:

> The command (in Terminal)
>
>     ls -lT air.tex | awk '{print \$8" "\$7" " \$6" "\$9}'
>
> returns the 3 strings (in this example)
>
>    12:19:06 10 Dec 2006
>
> which is the last time the file air.tex was modified.
> It should be simple to have TeX (with shell-escape) capture
> this information and use it, rather than the time at which
> tex was invoked.  I don't know this sort of tex programming,
> but would be surprised if it weren't already available somewhere.

Another option is to use the rcsinfo package. It gets its information
from an \$Id\$ tag which is updated by cvs (and rcs, but don't use
that). This means the last date on which you synchronised your files
with the repository is used. For small projects (say, a letter) this
is overkill, but for larger projects (say, a thesis) I strongly
recommend to use some sort of version control.

And then the rcsinfo package solves both issues, as it can be set to
redefine \today to mean the date for the last synchronisation.

HTMH,

Maarten