mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-01 18:01:13 +02:00
#286, 288, 285, 242, 282, 296, 293
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@549 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -511,42 +511,42 @@ void CDateInput::onAfterExec()
|
||||
{
|
||||
struct tm tmTime;
|
||||
sscanf( value, "%02d.%02d.%04d %02d:%02d", &tmTime.tm_mday, &tmTime.tm_mon,
|
||||
&tmTime.tm_year,
|
||||
&tmTime.tm_hour, &tmTime.tm_min);
|
||||
&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;
|
||||
|
||||
if(tmTime.tm_year>129)
|
||||
tmTime.tm_year=129;
|
||||
if(tmTime.tm_year<0)
|
||||
tmTime.tm_year=0;
|
||||
if(tmTime.tm_mon>11)
|
||||
tmTime.tm_mon=11;
|
||||
if(tmTime.tm_mon<0)
|
||||
tmTime.tm_mon=0;
|
||||
if(tmTime.tm_mday>31) //-> eine etwas laxe pruefung, aber mktime biegt das wieder grade
|
||||
tmTime.tm_mday=31;
|
||||
if(tmTime.tm_mday<1)
|
||||
tmTime.tm_mday=1;
|
||||
if(tmTime.tm_hour>23)
|
||||
tmTime.tm_hour=23;
|
||||
if(tmTime.tm_hour<0)
|
||||
tmTime.tm_hour=0;
|
||||
if(tmTime.tm_min>59)
|
||||
tmTime.tm_min=59;
|
||||
if(tmTime.tm_min<0)
|
||||
tmTime.tm_min=0;
|
||||
if(tmTime.tm_sec>59)
|
||||
tmTime.tm_sec=59;
|
||||
if(tmTime.tm_sec<0)
|
||||
tmTime.tm_sec=0;
|
||||
tmTime.tm_year=129;
|
||||
if(tmTime.tm_year<0)
|
||||
tmTime.tm_year=0;
|
||||
if(tmTime.tm_mon>11)
|
||||
tmTime.tm_mon=11;
|
||||
if(tmTime.tm_mon<0)
|
||||
tmTime.tm_mon=0;
|
||||
if(tmTime.tm_mday>31) //-> eine etwas laxe pruefung, aber mktime biegt das wieder grade
|
||||
tmTime.tm_mday=31;
|
||||
if(tmTime.tm_mday<1)
|
||||
tmTime.tm_mday=1;
|
||||
if(tmTime.tm_hour>23)
|
||||
tmTime.tm_hour=23;
|
||||
if(tmTime.tm_hour<0)
|
||||
tmTime.tm_hour=0;
|
||||
if(tmTime.tm_min>59)
|
||||
tmTime.tm_min=59;
|
||||
if(tmTime.tm_min<0)
|
||||
tmTime.tm_min=0;
|
||||
if(tmTime.tm_sec>59)
|
||||
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,
|
||||
tmTime2->tm_year+1900,
|
||||
tmTime2->tm_hour, tmTime2->tm_min);
|
||||
tmTime2->tm_year+1900,
|
||||
tmTime2->tm_hour, tmTime2->tm_min);
|
||||
}
|
||||
//-----------------------------#################################-------------------------------------------------------
|
||||
|
||||
|
Reference in New Issue
Block a user