### _strtime -- Copy Time

Format

>     #include <time.h>
>     char *_strtime(char *time);

Language Level: Extension
_strtime copies the current time into the buffer that time points to. The format is:

       hh:mm:ss

where

- 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.

Return Value
_strtime returns a pointer to the buffer. There is no error return.

Example
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
       *****************************************************/
    }

asctime -- Convert Time to Character String
ctime -- Convert Time to Character String
gmtime -- Convert Time
localtime -- Convert Time
mktime -- Convert Local Time
time -- Determine Current Time
tzset -- Assign Values to Locale Information
<time.h>