summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-04-03 08:43:00 +0200
committerraveit65 <[email protected]>2020-05-24 22:20:24 +0200
commit4422e8100aa235739e83e61ee3e57d426793e731 (patch)
tree40f445e8d076aec85ee6ba9f0ec552b671137309
parent1bcfadf10f54e5aa9c782a818375ef350aa6e89b (diff)
downloadlibmateweather-4422e8100aa235739e83e61ee3e57d426793e731.tar.bz2
libmateweather-4422e8100aa235739e83e61ee3e57d426793e731.tar.xz
weather-iwin: Remove the warning about ‘GTimeVal’ is deprecated
-rw-r--r--configure.ac2
-rw-r--r--libmateweather/weather-iwin.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index eddf7a7..cb8a8ef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,7 +21,7 @@ AC_SUBST(LT_VERSION)
AC_CANONICAL_HOST
-GLIB_REQUIRED=2.50.0
+GLIB_REQUIRED=2.56.0
GTK_REQUIRED=3.22.0
LIBSOUP_REQUIRED=2.54.0
GIO_REQUIRED=2.25.0
diff --git a/libmateweather/weather-iwin.c b/libmateweather/weather-iwin.c
index d9c91c3..9f7ff38 100644
--- a/libmateweather/weather-iwin.c
+++ b/libmateweather/weather-iwin.c
@@ -143,10 +143,10 @@ parseForecastXml (const char *buff, WeatherInfo *master_info)
xmlChar *val = xmlNodeGetContent (c);
if (val) {
- GTimeVal tv;
-
- if (g_time_val_from_iso8601 ((const char *)val, &tv)) {
- update_times[count] = tv.tv_sec;
+ GDateTime *dt = g_date_time_new_from_iso8601 ((const char *)val, NULL);
+ if (dt != NULL) {
+ update_times[count] = g_date_time_to_unix (dt);
+ g_date_time_unref (dt);
} else {
update_times[count] = 0;
}