diff options
author | RALOVICH, Kristof <tade60@freemail.hu> | 2014-04-08 15:12:27 +0200 |
---|---|---|
committer | RALOVICH, Kristof <tade60@freemail.hu> | 2014-04-08 15:12:27 +0200 |
commit | 14e70586b80172e3b32cb2a4fd8f2c877eea92ac (patch) | |
tree | 8c4f2ac5ff0987017936d894d0d6efd1f394d6de | |
parent | 346b69375592b7e037553a62c701aa07378a4b99 (diff) |
vs strftime doesn't recognize %T
-rw-r--r-- | src/DeviceSettings.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/DeviceSettings.cpp b/src/DeviceSettings.cpp index 2b6f68b..38fccc4 100644 --- a/src/DeviceSettings.cpp +++ b/src/DeviceSettings.cpp @@ -99,9 +99,13 @@ DeviceSettings::time2str(const std::time_t t) gmtime_s(&tm, &t); #endif +#ifdef _MSC_VER + if(::strftime(outstr, sizeof(outstr), "%Y-%m-%dT%H:%M:%SZ", &tm) == 0) + return ""; +#else if(::strftime(outstr, sizeof(outstr), "%Y-%m-%dT%TZ", &tm) == 0) return ""; - +#endif return outstr; } |