summaryrefslogtreecommitdiff
path: root/plugins/NewsAggregator/Src/Utils.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2014-08-05 16:16:53 +0000
committerKirill Volinsky <mataes2007@gmail.com>2014-08-05 16:16:53 +0000
commit65b18d6e938fccdca0ca66513e7855ebbf296897 (patch)
treefea561a00986af1852117976ef7133758669193f /plugins/NewsAggregator/Src/Utils.cpp
parent1af94ebb50d3c533e895c279ad78a9cf4c26d019 (diff)
fixed #743
git-svn-id: http://svn.miranda-ng.org/main/trunk@10076 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NewsAggregator/Src/Utils.cpp')
-rw-r--r--plugins/NewsAggregator/Src/Utils.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/NewsAggregator/Src/Utils.cpp b/plugins/NewsAggregator/Src/Utils.cpp
index 3ac7545883..662841a2cb 100644
--- a/plugins/NewsAggregator/Src/Utils.cpp
+++ b/plugins/NewsAggregator/Src/Utils.cpp
@@ -210,7 +210,7 @@ time_t __stdcall DateToUnixTime(TCHAR *stamp, BOOL FeedType)
TCHAR weekday[4], monthstr[4], timezonesign[2];
INT day, month, year, hour, min, sec, timezoneh, timezonem;
if (_tcsstr(p, _T(","))) {
- _stscanf( p, _T("%3s, %d %3s %d %d:%d:%d %1s%02d%02d"), &weekday, &day, &monthstr, &year, &hour, &min, &sec, &timezonesign, &timezoneh, &timezonem);
+ _stscanf(p, _T("%3s, %d %3s %d %d:%d:%d %1s%02d%02d"), &weekday, &day, &monthstr, &year, &hour, &min, &sec, &timezonesign, &timezoneh, &timezonem);
if (!lstrcmpi(monthstr, _T("Jan")))
month = 1;
if (!lstrcmpi(monthstr, _T("Feb")))
@@ -244,9 +244,13 @@ time_t __stdcall DateToUnixTime(TCHAR *stamp, BOOL FeedType)
else
mir_sntprintf(p, 4 + 2 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour, min, sec);
}
+ else if (_tcsstr(p, _T("T"))) {
+ _stscanf(p, _T("%d-%d-%dT%d:%d:%d"), &year, &month, &day, &hour, &min, &sec);
+ mir_sntprintf(p, 4 + 2 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour, min, sec);
+ }
else
{
- _stscanf( p, _T("%d-%d-%d %d:%d:%d %1s%02d%02d"), &year, &month, &day, &hour, &min, &sec, &timezonesign, &timezoneh, &timezonem);
+ _stscanf(p, _T("%d-%d-%d %d:%d:%d %1s%02d%02d"), &year, &month, &day, &hour, &min, &sec, &timezonesign, &timezoneh, &timezonem);
if (!lstrcmp(timezonesign, _T("+")))
mir_sntprintf(p, 4 + 2 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour-timezoneh, min-timezonem, sec);
else if (!lstrcmp(timezonesign, _T("-")))