]>
code.delx.au - gnu-emacs-elpa/blob - packages/notes-mode/strftime.c
4 * $Id: strftime.c,v 1.4 1999/01/28 19:26:29 johnh Exp $
6 * Copyright (C) 1996 by John Heidemann.
7 * Comments to <johnh@isi.edu>.
9 * This file is under the Gnu Public License, version 2.
10 * For details see the COPYING which accompanies this distribution.
19 printf ("usage: strftime format epoch_time\n");
20 printf ("\tThis program exists because Perl's POSIX loads in 880ms\n");
21 printf ("\twhile this program can run in ~20ms,\n");
22 printf ("\tand because some NT users find Perl's POSIX lacks strftime.\n");
37 time
= atol(argv
[2]); /* sigh. Hope int==time_t */
38 tm
= localtime(&time
);
39 strftime(s
, SLEN
, argv
[1], tm
);