aboutsummaryrefslogtreecommitdiff
path: root/src/tests/test-modem-helpers.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2016-11-17 12:09:11 +0100
committerAleksander Morgado <aleksander@aleksander.es>2016-11-18 10:25:07 +0100
commit51e3d3d8372e615e9c9a62408638cd8a480f5a14 (patch)
tree25b05a8843d22e86b55c5be14791b83bde0050f1 /src/tests/test-modem-helpers.c
parent64b4afa960e7440505dfb1f18ca9c20506d7e16e (diff)
modem-helpers: improve +CCLK parsing
Added support for 4-digit format years (i.e. YYYY), and also made the timezone information optional, as per +CSDF in 3GPP TS 27.007. https://bugs.freedesktop.org/show_bug.cgi?id=95319
Diffstat (limited to 'src/tests/test-modem-helpers.c')
-rw-r--r--src/tests/test-modem-helpers.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tests/test-modem-helpers.c b/src/tests/test-modem-helpers.c
index 0afa22fc..cd5ddfa1 100644
--- a/src/tests/test-modem-helpers.c
+++ b/src/tests/test-modem-helpers.c
@@ -2849,6 +2849,13 @@ typedef struct {
} CclkTest;
static const CclkTest cclk_tests[] = {
+ { "+CCLK: \"14/08/05,04:00:21\"", TRUE, TRUE, FALSE,
+ "2014-08-05T04:00:21+00:00", 0 },
+ { "+CCLK: \"14/08/05,04:00:21\"", TRUE, FALSE, TRUE,
+ "2014-08-05T04:00:21+00:00", 0 },
+ { "+CCLK: \"14/08/05,04:00:21\"", TRUE, TRUE, TRUE,
+ "2014-08-05T04:00:21+00:00", 0 },
+
{ "+CCLK: \"14/08/05,04:00:21+40\"", TRUE, TRUE, FALSE,
"2014-08-05T04:00:21+10:00", 600 },
{ "+CCLK: \"14/08/05,04:00:21+40\"", TRUE, FALSE, TRUE,