gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 6310i and acer bt-500


From: Zsolt KOZAK
Subject: Re: 6310i and acer bt-500
Date: Tue, 10 Jun 2003 09:37:58 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4b) Gecko/20030507

Hi folks!

Okay I answer myself. ;-)
I've patched xgnokii_sms.c. If somebody is interested in this "sms sorting problem", just feel free to use this patch. It's against gnokii-0.5.1.

regards,
Zsolt

On 2003-06-07 15:10, Zsolt KOZAK wrote:

I have only one little problem. I've download my SMSs from the phone and tried to sort them. When I click on date "Date/Time" tab, gnokii sorts them by Date/Time. But date format is dd/mm/yyyy ... so gnokii sorts my message by day... So sorting is not a real date-sorting... How can I modify date format to yyyy/mm/dd? Because if I have a yyyy/mm/dd format, gnokii can sort messages correctly.



--
Zsolt KOZAK      address@hidden
personal web:    http://zso.lt
Road To Avonlea: http://www.avonlea.hu

diff -Naur xgnokii_sms.c xgnokii_sms.c
--- xgnokii_sms.c       Thu May 29 19:34:52 2003
+++ xgnokii_sms.c       Sat Jun  7 23:50:22 2003
@@ -357,18 +357,18 @@
 
                if (dt) {
                        if (dt->timezone)
-                               row[1] = g_strdup_printf("%02d/%02d/%04d 
%02d:%02d:%02d %c%02d00",
-                                                        dt->day, dt->month, 
dt->year,
+                               row[1] = g_strdup_printf("%04d/%02d/%02d 
%02d:%02d:%02d %c%02d00",
+                                                        dt->year, dt->month, 
dt->day,
                                                         dt->hour, dt->minute, 
dt->second,
                                                         dt->timezone > 0 ? '+' 
: '-',
                                                         abs(dt->timezone));
                        else
-                               row[1] = g_strdup_printf("%02d/%02d/%04d 
%02d:%02d:%02d",
-                                                        dt->day, dt->month, 
dt->year,
+                               row[1] = g_strdup_printf("%04d/%02d/%02d 
%02d:%02d:%02d",
+                                                        dt->year, dt->month, 
dt->day,
                                                         dt->hour, dt->minute, 
dt->second);
                } else {
                        row[1] =
-                           g_strdup_printf("%02d/%02d/%04d %02d:%02d:%02d", 
01, 01, 0001, 01, 01,
+                           g_strdup_printf("%04d/%02d/%02d %02d:%02d:%02d", 
0001, 01, 01, 01, 01,
                                            01);
                }
 
@@ -676,12 +676,12 @@
                t.tm_min = atoi(dummy);
                snprintf(dummy, 3, "%s", text + 11);
                t.tm_hour = atoi(dummy);
-               snprintf(dummy, 3, "%s", text);
+               snprintf(dummy, 3, "%s", text + 8);
                t.tm_mday = atoi(dummy);
-               snprintf(dummy, 3, "%s", text + 3);
+               snprintf(dummy, 3, "%s", text + 5);
                t.tm_mon = atoi(dummy) - 1;
                dummy[5] = 0;
-               snprintf(dummy, 5, "%s", text + 6);
+               snprintf(dummy, 5, "%s", text );
                t.tm_year = atoi(dummy) - 1900;
 #ifdef HAVE_TM_GMTON
                if (text[19] != '\0')

reply via email to

[Prev in Thread] Current Thread [Next in Thread]