Author: bct Date: 2008-07-12 06:36:05 +0200 (Sat, 12 Jul 2008) New Revision: 9915
Modified: trunk/src/history_window.py Log: use YYYY-MM-DD dates in the chat history window so it sorts correctly
Modified: trunk/src/history_window.py =================================================================== --- trunk/src/history_window.py 2008-07-12 02:11:15 UTC (rev 9914) +++ trunk/src/history_window.py 2008-07-12 04:36:05 UTC (rev 9915) @@ -475,7 +475,8 @@ tim = row[1] message = row[4] local_time = time.localtime(tim) - date = time.strftime('%x', local_time) + date = time.strftime('%Y-%m-%d', local_time) + # jid (to which log is assigned to), name, date, message, # time (full unix time) model.append((jid, contact_name, date, message, tim)) @@ -512,7 +513,7 @@ cur_month = gtkgui_helpers.make_gtk_month_python_month(cur_month) model = widget.get_model() # make it a tupple (Y, M, D, 0, 0, 0...) - tim = time.strptime(model[path][C_UNIXTIME], '%x') + tim = time.strptime(model[path][C_UNIXTIME], '%Y-%m-%d') year = tim[0] gtk_month = tim[1] month = gtkgui_helpers.make_python_month_gtk_month(gtk_month)