Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ Language Reference - ctime http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   ctime

   Usage
   #include <time.h>
   char *ctime(time_t *ntime);

   Description
   Converts the calender time (type time_t) pointed to by ntime to  local
   time   in  the  form  of  an  ASCII  string.  It  is   equivalent   to
   asctime(localtime(ntime));.
   The  time_t  value ntime is normally obtained by a call  to  the  time
   function, obtaining time elapsed since midnight, January 1st 1970.

   Example
   #include <time.h>
   #include <stdio.h>
   time_t ntime;
   main()
   {
        time(&ntime);
        printf("The current time is %s\n",ctime(&ntime));
   }

   Return Value
   Returns pointer to a static ASCII string of 26 characters of the form:
   DDD MMM dd hh:mm:ss YYYY\n\0

   Where:
   DDD=day of the week
   MMM=month
   dd=day of the month
   hh:mm:ss=hour:minutes:seconds
   YYY=the year
   The string will be overwritten by each call to ctime().


See Also: Time_package asctime clock difftime localtime time

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson