Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals   Examples  

test_get_tsm_date.c

This example shows how to use the function get_tsm_date().

#include "date.h"
#include <stdlib.h>


extern struct tz_tab   tzs;


extern char *tzname[2];
extern time_t timezone;
extern int daylight;


int main (int argc, char *argv[])
{
   time_t tt;
   char *s;
   int  t;

   t = argc - 1;

   do 
   {
     tt = time(NULL);
     s = get_tsm_date(tt, t);
     if (s == NULL)
     {
       fprintf (stderr, "\nError while formatting TSM date\n");
       return 1;
     }

     fprintf (stdout, "\nTimestamp:   %d", (int)tt);
     fprintf (stdout, "\nTSM date is: [%s]", s);
     fprintf (stdout, "\n");
   } while (t);




   return 0;
}

Generated on Thu Apr 3 16:23:40 2003 for Common_C_libraries by doxygen1.3-rc1