summaryrefslogtreecommitdiff
path: root/epgsearch.cpp
diff options
context:
space:
mode:
authorDieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>2008-01-16 20:58:14 +0100
committerDieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>2008-01-16 20:58:14 +0100
commit53920ac400a4a062eb90bb1656140e03e19ecd3d (patch)
treec79e978737a52041c6812a872f7f827b2e57d0fe /epgsearch.cpp
parent6601d4c8cfe062f61196ef6f4e2ade0156c3345c (diff)
parent99b67b42f6844701667fe01b5d781d03ce299d59 (diff)
downloadvdr-plugin-live-53920ac400a4a062eb90bb1656140e03e19ecd3d.tar.gz
vdr-plugin-live-53920ac400a4a062eb90bb1656140e03e19ecd3d.tar.bz2
Merge commit 'winni/master'
Diffstat (limited to 'epgsearch.cpp')
-rw-r--r--epgsearch.cpp27
1 files changed, 0 insertions, 27 deletions
diff --git a/epgsearch.cpp b/epgsearch.cpp
index 622ef21..d22c636 100644
--- a/epgsearch.cpp
+++ b/epgsearch.cpp
@@ -320,17 +320,6 @@ string SearchTimer::StopTimeFormatted()
return FormatDateTime(tr("%I:%M %p"), stop);
}
-// format is in datepicker format ('mm' for month, 'dd' for day, 'yyyy' for year)
-string DatePickerToC(time_t date, string const& format)
-{
- if (date == 0) return "";
- string cformat = format;
- cformat = StringReplace(cformat, "mm", "%m");
- cformat = StringReplace(cformat, "dd", "%d");
- cformat = StringReplace(cformat, "yyyy", "%Y");
- return FormatDateTime(cformat.c_str(), date);
-}
-
string SearchTimer::UseAsSearchTimerFrom(string const& format)
{
return DatePickerToC(m_useAsSearchTimerFrom, format);
@@ -341,22 +330,6 @@ string SearchTimer::UseAsSearchTimerTil(string const& format)
return DatePickerToC(m_useAsSearchTimerTil, format);
}
-time_t GetDateFromDatePicker(std::string const& datestring, std::string const& format)
-{
- if (datestring.empty())
- return 0;
- int year = lexical_cast< int >(datestring.substr(format.find("yyyy"), 4));
- int month = lexical_cast< int >(datestring.substr(format.find("mm"), 2));
- int day = lexical_cast< int >(datestring.substr(format.find("dd"), 2));
- struct tm tm_r;
- tm_r.tm_year = year - 1900;
- tm_r.tm_mon = month -1;
- tm_r.tm_mday = day;
- tm_r.tm_hour = tm_r.tm_min = tm_r.tm_sec = 0;
- tm_r.tm_isdst = -1; // makes sure mktime() will determine the correct DST setting
- return mktime(&tm_r);
-}
-
void SearchTimer::SetUseAsSearchTimerFrom(std::string const& datestring, std::string const& format)
{
m_useAsSearchTimerFrom = GetDateFromDatePicker(datestring, format);