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
c1095b0c
Commit
c1095b0c
authored
Jul 02, 2020
by
Uwe Schulzweida
Browse files
scanTimeString: handle separator between reference date and time more flexible.
parent
9fa73548
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/stream_cdf_i.c
View file @
c1095b0c
...
...
@@ -123,8 +123,9 @@ void scanTimeString(const char *ptu, int64_t *rdate, int *rtime)
int
year
=
1
,
month
=
1
,
day
=
1
;
int
hour
=
0
,
minute
=
0
,
second
=
0
;
int
v1
=
1
,
v2
=
1
,
v3
=
1
;
char
ch
=
' '
;
if
(
*
ptu
)
sscanf
(
ptu
,
"%d-%d-%d
%d:%d:%d"
,
&
v1
,
&
v2
,
&
v3
,
&
hour
,
&
minute
,
&
second
);
if
(
*
ptu
)
sscanf
(
ptu
,
"%d-%d-%d
%c
%d:%d:%d"
,
&
v1
,
&
v2
,
&
v3
,
&
ch
,
&
hour
,
&
minute
,
&
second
);
if
(
v3
>
999
&&
v1
<
32
)
{
year
=
v3
;
month
=
v2
;
day
=
v1
;
}
...
...
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