Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LEFEBVREJP email
radix
Commits
c73f0616
Commit
c73f0616
authored
Jan 09, 2018
by
LEFEBVREJP email
Browse files
Updating struct tm to be struct std::tm to avoid ambigious namespacing.
parent
89482ee8
Pipeline
#11163
failed with stage
in 3 minutes and 44 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
radixcore/stringfunctions.cc
View file @
c73f0616
...
...
@@ -122,13 +122,13 @@ std::string remove_extra_whitespace(const std::string &inputStr)
return
trim_string
(
str
);
}
struct
tm
utc_to_time
(
const
std
::
string
&
time
,
int
&
zone
,
int
&
daylight
)
struct
std
::
tm
utc_to_time
(
const
std
::
string
&
time
,
int
&
zone
,
int
&
daylight
)
{
int
year
=
0
,
month
=
0
,
day
=
0
,
hour
=
0
,
minute
=
0
,
second
=
0
;
int
count
=
sscanf
(
time
.
c_str
(),
"%d-%d-%dT%d:%d:%d-%d:%d"
,
&
year
,
&
month
,
&
day
,
&
hour
,
&
minute
,
&
second
,
&
zone
,
&
daylight
);
radix_line
(
"utc_to_time elements: "
<<
count
);
struct
tm
res
;
struct
std
::
tm
res
;
res
.
tm_year
=
year
;
res
.
tm_mon
=
month
;
res
.
tm_mday
=
day
;
...
...
radixcore/stringfunctions.hh
View file @
c73f0616
...
...
@@ -24,8 +24,8 @@ namespace radix
* @param daylight daylight savings
* @return struct tm
*/
struct
tm
RADIX_PUBLIC
utc_to_time
(
const
std
::
string
&
time
,
int
&
zone
,
int
&
daylight
);
struct
std
::
tm
RADIX_PUBLIC
utc_to_time
(
const
std
::
string
&
time
,
int
&
zone
,
int
&
daylight
);
/**
* Convert a string to lowercase
...
...
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