Skip to content
Snippets Groups Projects
Commit 2a5da824 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

absolute timeaxis failed with timeunits seconds [Bug #11916]

parent 397588b3
No related branches found
No related tags found
1 merge request!100absolute timeaxis failed with timeunits seconds [Bug #11916]
Pipeline #81733 canceled
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
......
......@@ -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';
......
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment