SoundMetrics / aris-integration-sdk

SDK for building custom controllers for the ARIS sonar.
MIT License
5 stars 2 forks source link

connect.c:send_date_time() appears to send only the date #45

Closed curtnichols closed 7 years ago

curtnichols commented 7 years ago

As currently formatted, send_date_time() sends only the date, and in the wrong format. This code:

/* Format date as %Y-%m-%d */
strftime(now_str, sizeof(now_str), "%F", &now);

should probably be:

constexpr auto fmt = "%Y-%b-%d %H:%M:%S"; // 2017-Apr-01 12:34:56
strftime(now_str, sizeof(now_str), fmt, &now);

We should probably then test to make sure the sample program works.

fvasquez commented 7 years ago

That's weird. This bug was fixed by PR #38. The line of code in question looks like this now in the public repo.

strftime(now_str, sizeof(now_str), "%Y-%b-%d %T", &now);

Are you looking at an out-of-date submodule?

curtnichols commented 7 years ago

Ah, you're right. I'm working in a private repo w/submodule. Closing.