123 int verboseMode =
false;
124 int quietMode =
false;
131 getTimeStamp(
const char *timeformat[] ,
const char *timestr)
139 if(strncmp(timestr,
"now",3)) {
140 memset(&tm,0x0,
sizeof(
struct tm));
141 for(
int i=0; timeformat[i]!=NULL ; i++ ) {
143 if(strptime(timestr,timeformat[i], &tm)!=NULL) {
151 fprintf(stderr,
"time stamp %s not understood\n",timestr);
152 fprintf(stderr,
"\tvalid formats are:\n");
153 for(
int i=0; timeformat[i]!=NULL ; i++ )
154 fprintf(stderr,
"\t%s\n",timeformat[i]);
159 char *tstr=NULL,*nline=NULL;
161 dprintf(
"TIME STAMP: ");
162 tstr=asctime(localtime(&ts));
163 nline=strrchr(tstr,
'\n');
164 if(nline!=NULL) *nline=0x00;
165 dprintf(
"%s (%s)\t",tstr,tzname[daylight]);
167 tstr=asctime(gmtime(&ts));
168 nline=strrchr(tstr,
'\n');
169 if(nline!=NULL) *nline=0x00;
170 dprintf(
"%s (GMT)\n",tstr);
179 timeStringConv1(
const char *a,
char *b) {
197 fmtSqlTime(
const char* sqltime) {
198 static char stringTime[1024];
199 timeStringConv1(sqltime,stringTime);
210 fmt(
const char *s,
const int len) {
211 static char fmtstr[EEmcDbMaxDbPathLen];
212 sprintf(fmtstr,
"%s %%%d[A-z0-9 \\t]\n",s,len-1);