Main Page   Class Hierarchy   File List  

fmtTime.cpp

00001 #include <time.h>
00002 #include <cstdlib>
00003 #include <memory.h>
00004 tm * parseTime( const char * strTime, const char * strFormat, tm * t )
00005 {
00006   memset( t, 0, sizeof(t) );
00007   strptime(strTime, strFormat, t);
00008   return t;
00009 }
00010 
00011 time_t fixTime(struct tm *tp)
00012 {
00013   return mktime(tp);
00014 }
00015 
00016 size_t fmtTime(char * s, size_t max, const char *format, const struct tm *tp)
00017 {
00018   return strftime(s, max, format, tp);
00019 }
00020 
00021 tm * currentTime( tm* t )
00022 {
00023   time_t lt;
00024   time(&lt);
00025   localtime_r(&lt,t);
00026   return t;
00027 }

Generated on Tue Jan 20 09:06:56 2004 for OpenTools by doxygen1.2.18