diff options
author | Olivier Le Thanh Duong <olivier.le.thanh@collabora.co.uk> | 2009-10-05 19:10:25 +0200 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2009-10-21 19:04:47 -0500 |
commit | 6d9bd02480a575615b0294a748e345cdeb5fbaec (patch) | |
tree | e3af7f29a08daaeb2e0386cb7daad575622e0701 | |
parent | 1b13ce308f0aabefa2da63ac77c6035948d6b4d1 (diff) | |
download | ofono-6d9bd02480a575615b0294a748e345cdeb5fbaec.tar.bz2 |
Migrate from RFC2822 to ISO8601
-rw-r--r-- | plugins/example_history.c | 6 | ||||
-rw-r--r-- | src/sms.c | 4 | ||||
-rw-r--r-- | src/voicecall.c | 2 | ||||
-rw-r--r-- | unit/test-sms.c | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/plugins/example_history.c b/plugins/example_history.c index 384c88dc..d923a8e0 100644 --- a/plugins/example_history.c +++ b/plugins/example_history.c @@ -68,11 +68,11 @@ static void example_history_call_ended(struct ofono_history_context *context, else ofono_debug("From: %s", from); - strftime(buf, 127, "%a, %d %b %Y %H:%M:%S %z", localtime(&start)); + strftime(buf, 127, "%Y-%m-%dT%H:%M:%S%z", localtime(&start)); buf[127] = '\0'; ofono_debug("StartTime: %s", buf); - strftime(buf, 127, "%a, %d %b %Y %H:%M:%S %z", localtime(&end)); + strftime(buf, 127, "%Y-%m-%dT%H:%M:%S%z", localtime(&end)); buf[127] = '\0'; ofono_debug("EndTime: %s", buf); } @@ -96,7 +96,7 @@ static void example_history_call_missed(struct ofono_history_context *context, from = phone_number_to_string(&call->phone_number); ofono_debug("From: %s", from); - strftime(buf, 127, "%a, %d %b %Y %H:%M:%S %z", localtime(&when)); + strftime(buf, 127, "%Y-%m-%dT%H:%M:%S%z", localtime(&when)); buf[127] = '\0'; ofono_debug("When: %s", buf); } @@ -467,11 +467,11 @@ static void dispatch_text_message(struct ofono_sms *sms, ts = sms_scts_to_time(scts, &remote); - strftime(buf, 127, "%a, %d %b %Y %H:%M:%S %z", localtime(&ts)); + strftime(buf, 127, "%Y-%m-%dT%H:%M:%S%z", localtime(&ts)); buf[127] = '\0'; ofono_dbus_dict_append(&dict, "LocalSentTime", DBUS_TYPE_STRING, &str); - strftime(buf, 127, "%a, %d %b %Y %H:%M:%S %z", &remote); + strftime(buf, 127, "%Y-%m-%dT%H:%M:%S%z", &remote); buf[127] = '\0'; ofono_dbus_dict_append(&dict, "SentTime", DBUS_TYPE_STRING, &str); diff --git a/src/voicecall.c b/src/voicecall.c index ef4c171a..a50bb661 100644 --- a/src/voicecall.c +++ b/src/voicecall.c @@ -164,7 +164,7 @@ static const char *time_to_str(const time_t *t) { static char buf[128]; - strftime(buf, 127, "%a, %d %b %Y %H:%M:%S %z", localtime(t)); + strftime(buf, 127, "%Y-%m-%dT%H:%M:%S%z", localtime(t)); buf[127] = '\0'; return buf; diff --git a/unit/test-sms.c b/unit/test-sms.c index ac4f1ffd..9c1528c5 100644 --- a/unit/test-sms.c +++ b/unit/test-sms.c @@ -59,12 +59,12 @@ static void print_scts(struct sms_scts *scts, const char *prefix) ts = sms_scts_to_time(scts, &remote); - strftime(buf, 127, "%a, %d %b %Y %H:%M:%S %z", localtime(&ts)); + strftime(buf, 127, "%Y-%m-%dT%H:%M:%S%z", localtime(&ts)); buf[127] = '\0'; g_print("local time: %s\n", buf); - strftime(buf, 127, "%a, %d %b %Y %H:%M:%S %z", &remote); + strftime(buf, 127, "%Y-%m-%dT%H:%M:%S%z", &remote); buf[127] = '\0'; g_print("remote time: %s\n", buf); |