|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T a
Length: 829 (0x33d)
Types: TextFile
Names: »asctime.c«
└─⟦a0efdde77⟧ Bits:30001252 EUUGD11 Tape, 1987 Spring Conference Helsinki
└─⟦this⟧ »EUUGD11/euug-87hel/sec3/localtime/asctime.c«
#
/*LINTLIBRARY*/
#include "stdio.h"
#ifndef lint
#ifndef NOID
static char sccsid[] = "@(#)asctime.c 3.1";
#endif /* !NOID */
#endif /* !lint */
#include "time.h"
#include "tzfile.h"
#ifndef USG
extern char * sprintf();
#endif /* !USG */
/*
** A la X3J11
*/
char *
asctime(timeptr)
register struct tm * timeptr;
{
static char wday_name[DAYS_PER_WEEK][3] = {
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
};
static char mon_name[MONS_PER_YEAR][3] = {
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
};
static char result[26];
(void) sprintf(result, "%.3s %.3s%3d %.2d:%.2d:%.2d %d\n",
wday_name[timeptr->tm_wday],
mon_name[timeptr->tm_mon],
timeptr->tm_mday, timeptr->tm_hour,
timeptr->tm_min, timeptr->tm_sec,
TM_YEAR_BASE + timeptr->tm_year);
return result;
}