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(<);
00025 localtime_r(<,t);
00026 return t;
00027 }