X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=parse-xml.c;h=c44b6f6ae359c707de417fa4a54de4548bbfbff1;hb=5076397df043fb51a776a677fc771fb1a72e6496;hp=6a08a3845c9551c3f35b818ff5c51b468537abda;hpb=254b851e44a31e2028a2fdddfb4f6989a8e59374;p=ext%2Fsubsurface.git diff --git a/parse-xml.c b/parse-xml.c index 6a08a38..c44b6f6 100644 --- a/parse-xml.c +++ b/parse-xml.c @@ -604,6 +604,8 @@ static void try_to_fill_sample(struct sample *sample, const char *name, char *bu return; if (MATCH(".sample.cylpress", pressure, &sample->cylinderpressure)) return; + if (MATCH(".sample.cylinderindex", get_index, &sample->cylinderindex)) + return; if (MATCH(".sample.depth", depth, &sample->depth)) return; if (MATCH(".sample.temp", temperature, &sample->temperature)) @@ -781,8 +783,14 @@ static void uemis_ts(char *buffer, void *_when) struct tm tm; time_t *when = _when; - strptime(buffer, "%Y-%m-%dT%H:%M:%S", &tm); + memset(&tm, 0, sizeof(tm)); + sscanf(buffer,"%d-%d-%dT%d:%d:%d", + &tm.tm_year, &tm.tm_mon, &tm.tm_mday, + &tm.tm_hour, &tm.tm_min, &tm.tm_sec); + tm.tm_mon -= 1; + tm.tm_year -= 1900; *when = utc_mktime(&tm); + } static void uemis_duration(char *buffer, void *_duration)