www.delorie.com/djgpp/doc/libc-2.01/libc_40.html   search  
Go to the first, previous, next, last section, table of contents.


asctime

Syntax

#include <time.h>

char *asctime(const struct tm *tptr);

Description

This function returns an ASCII representation of the time represented by tptr. The string returned is always 26 characters and has this format:

Sun Jan 01 12:34:56 1993\n\0

The string pointed to is in a static buffer and will be overridden with each call to asctime. The data should be copied if it needs to be preserved.

Return Value

A pointer to the string.

Example

time_t now;
time(&now);
printf("The current time is %s", asctime(localtime(&now)));


Go to the first, previous, next, last section, table of contents.

  prev next   webmaster     delorie software   privacy  
  Copyright © 1997     Updated Apr 1997