Syntax
#include <time.h> char *_strtime(char *time);Description
hh:mm:sswhere
hh represents the hour in 24-hour notation,
mm represents the minutes past the hour,
ss represents the number of seconds.
For example, the string 18:23:44 represents 23 minutes and 44 seconds past 6 p.m.
The buffer must be at least 9 bytes.
Note: The time and date functions begin at 00:00:00 Coordinated Universal Time, January 1, 1970.
This example prints the current time:
#include <stdio.h>#include <time.h> int main(void) { char buffer[9]; printf("The current time is %s \n", _strtime(buffer)); return 0; /**************************************************************************** The output should be similar to: The current time is 16:47:22 ****************************************************************************/ }Related Information