Commit c73f0616 authored by LEFEBVREJP email's avatar 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
......@@ -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;
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment