summaryrefslogtreecommitdiff
path: root/libmateweather
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 /libmateweather
parent1bcfadf10f54e5aa9c782a818375ef350aa6e89b (diff)
downloadlibmateweather-4422e8100aa235739e83e61ee3e57d426793e731.tar.bz2
libmateweather-4422e8100aa235739e83e61ee3e57d426793e731.tar.xz
weather-iwin: Remove the warning about ‘GTimeVal’ is deprecated
Diffstat (limited to 'libmateweather')
-rw-r--r--libmateweather/weather-iwin.c8
1 files changed, 4 insertions, 4 deletions
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;
}