kuuko pushed a commit to branch master. http://git.enlightenment.org/bindings/python/python-efl.git/commit/?id=7896899abc35604fe2909508cd398e1bc7b81696
commit 7896899abc35604fe2909508cd398e1bc7b81696 Author: Nathan Jervis <mirh...@gmail.com> Date: Sat Nov 9 11:49:06 2013 +0200 Elementary: Fix the number of seconds in a day in calendar examples. --- efl/elementary/calendar_elm.pyx | 4 ++-- examples/elementary/test_calendar.py | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/efl/elementary/calendar_elm.pyx b/efl/elementary/calendar_elm.pyx index 2811d1f..9d07b12 100644 --- a/efl/elementary/calendar_elm.pyx +++ b/efl/elementary/calendar_elm.pyx @@ -222,11 +222,11 @@ cdef class CalendarMark(object): cal = Calendar(win) - current_time = time.time() + 5 * 84600 + current_time = time.time() + 5 * 86400 selected_time = date.fromtimestamp(current_time) CalendarMark(cal, "holiday", selected_time, ELM_CALENDAR_ANNUALLY) - current_time = time.time() + 1 * 84600 + current_time = time.time() + 1 * 86400 selected_time = date.fromtimestamp(current_time) CalendarMark(cal, "checked", selected_time, ELM_CALENDAR_UNIQUE) diff --git a/examples/elementary/test_calendar.py b/examples/elementary/test_calendar.py index befe3a2..4f907e1 100644 --- a/examples/elementary/test_calendar.py +++ b/examples/elementary/test_calendar.py @@ -189,10 +189,10 @@ def test_calendar2(obj): cal3 = elm_calendar_add(win) evas_object_size_hint_weight_set(cal3, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND) evas_object_size_hint_align_set(cal3, EVAS_HINT_FILL, EVAS_HINT_FILL) - current_time = time(NULL) + 34 * 84600 + current_time = time(NULL) + 34 * 86400 localtime_r(¤t_time, &selected_time) elm_calendar_selected_time_set(cal3, &selected_time) - current_time = time(NULL) + 1 * 84600 + current_time = time(NULL) + 1 * 86400 localtime_r(¤t_time, &selected_time) elm_calendar_mark_add(cal3, "checked", &selected_time, ELM_CALENDAR_UNIQUE) elm_calendar_marks_clear(cal3) @@ -220,24 +220,24 @@ def test_calendar2(obj): elm_calendar_format_function_set(cal, _format_month_year) elm_calendar_min_max_year_set(cal, 2010, 2020) - current_time = time(NULL) + 4 * 84600 + current_time = time(NULL) + 4 * 86400 localtime_r(¤t_time, &selected_time) elm_calendar_mark_add(cal, "holiday", &selected_time, ELM_CALENDAR_ANNUALLY) - current_time = time(NULL) + 1 * 84600 + current_time = time(NULL) + 1 * 86400 localtime_r(¤t_time, &selected_time) elm_calendar_mark_add(cal, "checked", &selected_time, ELM_CALENDAR_UNIQUE) - current_time = time(NULL) - 363 * 84600 + current_time = time(NULL) - 363 * 86400 localtime_r(¤t_time, &selected_time) elm_calendar_mark_add(cal, "checked", &selected_time, ELM_CALENDAR_MONTHLY) - current_time = time(NULL) - 5 * 84600 + current_time = time(NULL) - 5 * 86400 localtime_r(¤t_time, &selected_time) mark = elm_calendar_mark_add(cal, "holiday", &selected_time, ELM_CALENDAR_WEEKLY) - current_time = time(NULL) + 1 * 84600 + current_time = time(NULL) + 1 * 86400 localtime_r(¤t_time, &selected_time) elm_calendar_mark_add(cal, "holiday", &selected_time, ELM_CALENDAR_WEEKLY) @@ -263,7 +263,7 @@ def test_calendar3(obj): cal = elm_calendar_add(win) elm_calendar_first_day_of_week_set(cal, ELM_DAY_THURSDAY) elm_calendar_select_mode_set(cal, ELM_CALENDAR_SELECT_MODE_ONDEMAND) - current_time = time(NULL) + 34 * 84600 + current_time = time(NULL) + 34 * 86400 localtime_r(¤t_time, &selected_time) elm_calendar_selected_time_set(cal, &selected_time) evas_object_size_hint_weight_set(cal, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND) --