1/*	$NetBSD: ctime_r.c,v 1.1.1.4 2023/08/18 18:36:49 christos Exp $	*/
2
3/*	$File: ctime_r.c,v 1.3 2022/09/24 20:30:13 christos Exp $	*/
4
5#include "file.h"
6#ifndef	lint
7#if 0
8FILE_RCSID("@(#)$File: ctime_r.c,v 1.3 2022/09/24 20:30:13 christos Exp $")
9#else
10__RCSID("$NetBSD: ctime_r.c,v 1.1.1.4 2023/08/18 18:36:49 christos Exp $");
11#endif
12#endif	/* lint */
13#include <time.h>
14#include <string.h>
15
16/* ctime_r is not thread-safe anyway */
17char *
18ctime_r(const time_t *t, char *dst)
19{
20	char *p = ctime(t);
21	if (p == NULL)
22		return NULL;
23	memcpy(dst, p, 26);
24	return dst;
25}
26