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
639a44d0
Commit
639a44d0
authored
Mar 08, 2013
by
Uwe Schulzweida
Browse files
vtime2timeval: check validity of month
parent
3845489a
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
639a44d0
...
...
@@ -3,6 +3,10 @@
* Version 1.6.0 released
* using CGRIBEX library version 1.6.0
2013-03-08 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* vtime2timeval: check validity of month
2013-03-07 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* cdfDefGrid: bug fix for generic grids with nx or ny > 0
...
...
src/taxis.c
View file @
639a44d0
...
...
@@ -1015,8 +1015,6 @@ double vtime2timeval(int vdate, int vtime, taxis_t *taxis)
{
int
nmonth
,
dpm
;
dpm
=
days_per_month
(
calendar
,
year
,
month
);
value
=
(
year
-
ryear
)
*
12
-
rmonth
+
month
;
nmonth
=
(
int
)
value
;
...
...
@@ -1025,6 +1023,8 @@ double vtime2timeval(int vdate, int vtime, taxis_t *taxis)
while
(
month
>
12
)
{
month
-=
12
;
year
++
;
}
while
(
month
<
1
)
{
month
+=
12
;
year
--
;
}
dpm
=
days_per_month
(
calendar
,
year
,
month
);
encode_caldaysec
(
calendar
,
year
,
month
,
day
,
hour
,
minute
,
second
,
&
julday2
,
&
secofday2
);
julday_sub
(
julday1
,
secofday1
,
julday2
,
secofday2
,
&
days
,
&
secs
);
...
...
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