Skip to contentSkip to conversation

Fix X-IRMC-CALL-DATETIME format

PATCH In review Luiz Augusto von Dentz 2 participants 2 messages Oct 13, 2010 Bluetooth drivers

lore
Share & tools
lore

Luiz Augusto von Dentz

author maintainer
#0 lore raw

PATCH 1/1 Fix X-IRMC-CALL-DATETIME format

From: Luiz Augusto von Dentz <[email protected]>

Use the format suggested in the spec:

"For instance, a call that was missed on March 20th, 2005 at 10 am would be stamped: X-IRMC-CALL-DATETIME;MISSED:20050320T100000"

---
 plugins/phonebook-tracker.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
plugins/phonebook-tracker.c +2 -2
index d0cea2e..39e4c81 100644
@@ -705,7 +705,7 @@ static char *iso8601_utc_to_localtime(const char *datetime)
 
 	memset(&tm, 0, sizeof(tm));
 
-	nr = sscanf(datetime, "%04u-%02u-%02uT%02u:%02u:%02u%c",
+	nr = sscanf(datetime, "%04u%02u%02uT%02u%02u%02u%c",
 			&tm.tm_year, &tm.tm_mon, &tm.tm_mday,
 			&tm.tm_hour, &tm.tm_min, &tm.tm_sec,
 			&tz);
@@ -726,7 +726,7 @@ static char *iso8601_utc_to_localtime(const char *datetime)
 
 	local = localtime(&time);
 
-	strftime(localdate, sizeof(localdate), "%Y-%m-%dT%H:%M:%S", local);
+	strftime(localdate, sizeof(localdate), "%Y%m%dT%H%M%S", local);
 
 	return g_strdup(localdate);
 }
Signature · 1 line
1.7.1
#1 lore raw

Hi Luiz,

Quoted 9 lines · Luiz Augusto von Dentz

From: Luiz Augusto von Dentz <[email protected]>

Use the format suggested in the spec:

"For instance, a call that was missed on March 20th, 2005 at 10 am would be stamped: X-IRMC-CALL-DATETIME;MISSED:20050320T100000"

---
 plugins/phonebook-tracker.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Pushed upstream. Thanks.

Johan