diff --git a/ChangeLog b/ChangeLog index be3386e10bbc5c5522d4bd83dfa96b02761d81d6..c0a4b58d7983dddf596f5b57f81437e99908cc65 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2024-09-19 Uwe Schulzweida + + * Version 2.4.4 released + +2024-09-18 Uwe Schulzweida + + * absolute timeaxis failed with timeunits seconds [Bug #11916] + 2024-08-14 Uwe Schulzweida * Version 2.4.3 released diff --git a/src/stream_cdf_time.c b/src/stream_cdf_time.c index 62d8a29a998dce7b3e5354307134a6c28b5040a4..dc594c44d4d14dd8080fc484636b7cdff7f8ecfb 100644 --- a/src/stream_cdf_time.c +++ b/src/stream_cdf_time.c @@ -203,11 +203,9 @@ cdfDefTime(stream_t *streamptr) } else { - /* define bogus value since at this time, streamDefTimestep has - * not been called yet - * but since taxis->units is not set, it clearly will not - * exceed the size of unitstr_, i.e. when defining the units - * attribute to this value, a later redefinition will not + /* define bogus value since at this time, streamDefTimestep has not been called yet + * but since taxis->units is not set, it clearly will not exceed the size of unitstr_, + * i.e. when defining the units attribute to this value, a later redefinition will not * cause a recreation of on-disk data */ for (size_t i = 0; i < CDF_MAX_TIME_UNIT_STR; ++i) unitsStr_[i] = 'a'; diff --git a/src/taxis.c b/src/taxis.c index a22ffb4e27cb83a6ebc188fd7f2d9ce5bccc1737..5acf45b5715e6dba9f64f41f1473927f3a56ddfd 100644 --- a/src/taxis.c +++ b/src/taxis.c @@ -1289,6 +1289,7 @@ cdi_decode_timeval(double timevalue, const taxis_t *taxis) return (taxis->type == TAXIS_ABSOLUTE) ? split_timevalue(timevalue, taxis->unit) : rtimeval2datetime(timevalue, taxis); } +/* static int64_t datetime2seconds(CdiDateTime datetime) { @@ -1305,7 +1306,7 @@ datetime2seconds(CdiDateTime datetime) return seconds; } - +*/ double cdi_encode_timeval(CdiDateTime datetime, taxis_t *taxis) { @@ -1322,10 +1323,12 @@ cdi_encode_timeval(CdiDateTime datetime, taxis_t *taxis) int64_t xdate = cdiDate_get(datetime.date); timeValue = (double) xdate / 100 + copysign((double) (datetime.date.day != 0) * 0.5, (double) xdate); } + /* else if (taxis->unit == TUNIT_SECOND) { timeValue = (double) datetime2seconds(datetime); } + */ else { int hour, minute, second, ms;