From aaacc8120a8105ad053bb8acf7398a187e79e6ee Mon Sep 17 00:00:00 2001 From: okaestne Date: Sat, 1 Jul 2023 23:38:24 +0200 Subject: [PATCH] huawei: don't add DST to TZ offset DST is already included in TZ offset. Adjust tests accordingly. --- src/plugins/huawei/mm-modem-helpers-huawei.c | 2 +- src/plugins/huawei/tests/test-modem-helpers-huawei.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/plugins/huawei/mm-modem-helpers-huawei.c b/src/plugins/huawei/mm-modem-helpers-huawei.c index 67bb7089..23ffc153 100644 --- a/src/plugins/huawei/mm-modem-helpers-huawei.c +++ b/src/plugins/huawei/mm-modem-helpers-huawei.c @@ -1244,7 +1244,7 @@ mm_huawei_parse_nwtime_response (const gchar *response, /* Return ISO-8601 format date/time string */ *iso8601p = mm_new_iso8601_time (year, month, day, hour, minute, second, - TRUE, (tz * 15) + (dt * 60), + TRUE, (tz * 15), error); return (*iso8601p != NULL); } diff --git a/src/plugins/huawei/tests/test-modem-helpers-huawei.c b/src/plugins/huawei/tests/test-modem-helpers-huawei.c index e6f2490b..1a686f93 100644 --- a/src/plugins/huawei/tests/test-modem-helpers-huawei.c +++ b/src/plugins/huawei/tests/test-modem-helpers-huawei.c @@ -1086,18 +1086,18 @@ static const NwtimeTest nwtime_tests[] = { "2014-08-05T04:00:21+05", 300, 0, NWT_UNKNOWN }, { "^NWTIME: 14/08/05,04:00:21+40,01", TRUE, TRUE, FALSE, - "2014-08-05T04:00:21+11", 600, 60, NWT_UNKNOWN }, + "2014-08-05T04:00:21+10", 600, 60, NWT_UNKNOWN }, { "^NWTIME: 14/08/05,04:00:21+40,01", TRUE, FALSE, TRUE, - "2014-08-05T04:00:21+11", 600, 60, NWT_UNKNOWN }, + "2014-08-05T04:00:21+10", 600, 60, NWT_UNKNOWN }, { "^NWTIME: 14/08/05,04:00:21+40,01", TRUE, TRUE, TRUE, - "2014-08-05T04:00:21+11", 600, 60, NWT_UNKNOWN }, + "2014-08-05T04:00:21+10", 600, 60, NWT_UNKNOWN }, { "^NWTIME: 14/08/05,04:00:21+40,02", TRUE, TRUE, FALSE, - "2014-08-05T04:00:21+12", 600, 120, NWT_UNKNOWN }, + "2014-08-05T04:00:21+10", 600, 120, NWT_UNKNOWN }, { "^NWTIME: 14/08/05,04:00:21+40,02", TRUE, FALSE, TRUE, - "2014-08-05T04:00:21+12", 600, 120, NWT_UNKNOWN }, + "2014-08-05T04:00:21+10", 600, 120, NWT_UNKNOWN }, { "^NWTIME: 14/08/05,04:00:21+40,02", TRUE, TRUE, TRUE, - "2014-08-05T04:00:21+12", 600, 120, NWT_UNKNOWN }, + "2014-08-05T04:00:21+10", 600, 120, NWT_UNKNOWN }, { "^TIME: XX/XX/XX,XX:XX:XX+XX,XX", FALSE, TRUE, FALSE, NULL, NWT_UNKNOWN, NWT_UNKNOWN, NWT_UNKNOWN },