mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 09:21:09 +02:00
Possible fix for timer over DST change
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@871 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Commit: ce19b5f582
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2010-10-28 (Thu, 28 Oct 2010)
This commit is contained in:
@@ -513,10 +513,12 @@ void CDateInput::onAfterExec()
|
||||
sscanf( value, "%02d.%02d.%04d %02d:%02d", &tmTime.tm_mday, &tmTime.tm_mon,
|
||||
&tmTime.tm_year,
|
||||
&tmTime.tm_hour, &tmTime.tm_min);
|
||||
tmTime.tm_mon-=1;
|
||||
tmTime.tm_year-=1900;
|
||||
tmTime.tm_sec=0;
|
||||
tmTime.tm_isdst=dst;
|
||||
tmTime.tm_mon -= 1;
|
||||
tmTime.tm_year -= 1900;
|
||||
tmTime.tm_sec = 0;
|
||||
|
||||
//tmTime.tm_isdst = dst;
|
||||
tmTime.tm_isdst = -1;
|
||||
|
||||
if(tmTime.tm_year>129)
|
||||
tmTime.tm_year=129;
|
||||
@@ -542,6 +544,7 @@ void CDateInput::onAfterExec()
|
||||
tmTime.tm_sec=59;
|
||||
if(tmTime.tm_sec<0)
|
||||
tmTime.tm_sec=0;
|
||||
|
||||
*time=mktime(&tmTime);
|
||||
struct tm *tmTime2 = localtime(time);
|
||||
sprintf( value, "%02d.%02d.%04d %02d:%02d", tmTime2->tm_mday, tmTime2->tm_mon+1,
|
||||
|
Reference in New Issue
Block a user