Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
9ea3e3d9
Commit
9ea3e3d9
authored
Jan 07, 2008
by
Uwe Schulzweida
Browse files
decode_timevalue: bug fix for rounding error
parent
fbc2792f
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
9ea3e3d9
...
...
@@ -6,6 +6,7 @@
for Int, Flt and Txt
* Add support for Lambert grids [request: Patrick Samuelsson]
* Change cdiDefCompress to streamDefZtype/streamDefZlevel
* decode_timevalue: bug fix for rounding error [report: Veronika Gayler]
* Version 1.1.0 released
2007-10-22 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
...
...
src/taxis.c
View file @
9ea3e3d9
...
...
@@ -847,7 +847,7 @@ void decode_timevalue(int timeunit, double timevalue, int *days, int *secs)
else
if
(
timeunit
==
TUNIT_DAY
)
{
*
days
=
(
int
)
timevalue
;
*
secs
=
(
int
)
((
timevalue
-
*
days
)
*
86400
);
*
secs
=
(
int
)
((
timevalue
-
*
days
)
*
86400
+
0
.
5
);
if
(
*
secs
<
0
)
{
*
days
-=
1
;
*
secs
+=
86400
;
};
/*
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment