Skip to content
GitLab
Menu
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
d87845f8
Commit
d87845f8
authored
Oct 10, 2007
by
Uwe Schulzweida
Browse files
No commit message
No commit message
parent
d7754f9e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/taxis.c
View file @
d87845f8
...
...
@@ -902,11 +902,13 @@ void encode_timevalue(int days, int secs, int timeunit, double *timevalue)
void
timeval2vtime
(
double
timevalue
,
TAXIS
*
taxis
,
int
*
vdate
,
int
*
vtime
)
{
static
char
func
[]
=
"timeval2vtime"
;
int
year
,
month
,
day
,
hour
,
minute
;
int
rdate
,
rtime
;
int
timeunit
;
int
calendar
;
int
julday
,
secofday
,
days
,
secs
;
static
int
lwarn
=
TRUE
;
*
vdate
=
0
;
*
vtime
=
0
;
...
...
@@ -923,6 +925,12 @@ void timeval2vtime(double timevalue, TAXIS *taxis, int *vdate, int *vtime)
{
if
(
timeunit
==
TUNIT_YEAR
)
timevalue
*=
12
;
if
(
(
NINT
(
timevalue
*
10
))
%
10
&&
lwarn
)
{
Warning
(
func
,
"Possible wrong calculation of date/time!
\n
Time offset must be integer for time unit MONTH and YEAR!"
);
lwarn
=
FALSE
;
}
month
+=
NINT
(
timevalue
);
while
(
month
>
12
)
{
month
-=
12
;
year
++
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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