Commit | Line | Data |
---|---|---|
73f8d282 | 1 | /* |
161423a6 RE |
2 | * Copyright (c) 1980 Regents of the University of California. |
3 | * All rights reserved. The Berkeley software License Agreement | |
4 | * specifies the terms and conditions for redistribution. | |
73f8d282 | 5 | * |
161423a6 RE |
6 | * @(#)fdate_.c 5.1 %G% |
7 | */ | |
8 | ||
9 | /* | |
73f8d282 DW |
10 | * Return date and time in an ASCII string. |
11 | * | |
12 | * calling sequence: | |
13 | * character*24 string | |
14 | * call fdate(string) | |
15 | * where: | |
16 | * the 24 character string will be filled with the date & time in | |
17 | * ascii form as described under ctime(3). | |
18 | * No 'newline' or NULL will be included. | |
19 | */ | |
20 | ||
21 | fdate_(s, strlen) | |
22 | char *s; long strlen; | |
23 | { | |
24 | char *ctime(), *c; | |
25 | long time(), t; | |
26 | ||
27 | t = time(0); | |
28 | c = ctime(&t); | |
29 | c[24] = '\0'; | |
30 | b_char(c, s, strlen); | |
31 | } |