From: Heikki Levanto Date: Thu, 11 Jul 2002 13:15:57 +0000 (+0000) Subject: Added notimestamps:1 option in the config file to disable X-Git-Tag: ZEBRA.1.3.0~30 X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=commitdiff_plain;h=eb675b4bc920ee55a2b94ce7c9febe558d2ae2ab Added notimestamps:1 option in the config file to disable timestamping in explain. Produces consistent checksums on all test runs! --- diff --git a/index/zinfo.c b/index/zinfo.c index 48e52fb..bb8ae33 100644 --- a/index/zinfo.c +++ b/index/zinfo.c @@ -3,7 +3,7 @@ * All rights reserved. * Sebastian Hammer, Adam Dickmeiss * - * $Id: zinfo.c,v 1.31 2002-07-03 10:05:19 adam Exp $ + * $Id: zinfo.c,v 1.32 2002-07-11 13:15:57 heikki Exp $ */ #include @@ -291,12 +291,17 @@ ZebraExplainInfo zebraExplain_open ( zei->categoryList->dirty = 0; zei->categoryList->data1_categoryList = NULL; - time (&our_time); - tm = localtime (&our_time); - sprintf (zei->date, "%04d%02d%02d%02d%02d%02d", - tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday, - tm->tm_hour, tm->tm_min, tm->tm_sec); - + if ( atoi (res_get_def (res, "notimestamps", "0") )== 0) + { + time (&our_time); + tm = localtime (&our_time); + sprintf (zei->date, "%04d%02d%02d%02d%02d%02d", + tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday, + tm->tm_hour, tm->tm_min, tm->tm_sec); + } else { + sprintf (zei->date, "%04d%02d%02d%02d%02d%02d", + 0, 0, 0, 0, 0, 0); + } zdip = &zei->databaseInfo; trec = rec_get (records, 1); /* get "root" record */