aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/module/xep
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2020-10-27 15:31:39 +0100
committerfiaxh <git@lightrise.org>2020-10-27 16:05:30 +0100
commit2e0357877cf3e8e391d3f8f02970defa93c710eb (patch)
tree4478a0deebbedf00934c7a7d6324180c4158bb38 /xmpp-vala/src/module/xep
parentedbc8f794d42cc30bfbe6602becb43c3500e02a2 (diff)
downloaddino-2e0357877cf3e8e391d3f8f02970defa93c710eb.tar.gz
dino-2e0357877cf3e8e391d3f8f02970defa93c710eb.zip
Fix some compiler warnings
Diffstat (limited to 'xmpp-vala/src/module/xep')
-rw-r--r--xmpp-vala/src/module/xep/0082_date_time_profiles.vala8
1 files changed, 2 insertions, 6 deletions
diff --git a/xmpp-vala/src/module/xep/0082_date_time_profiles.vala b/xmpp-vala/src/module/xep/0082_date_time_profiles.vala
index b23dfe7a..17ed9e09 100644
--- a/xmpp-vala/src/module/xep/0082_date_time_profiles.vala
+++ b/xmpp-vala/src/module/xep/0082_date_time_profiles.vala
@@ -1,16 +1,12 @@
namespace Xmpp.Xep.DateTimeProfiles {
public DateTime? parse_string(string time_string) {
- TimeVal time_val = TimeVal();
- if (time_val.from_iso8601(time_string)) {
- return new DateTime.from_unix_utc(time_val.tv_sec);
- }
- return null;
+ return new DateTime.from_iso8601(time_string, null);
}
public string to_datetime(DateTime time) {
- return time.to_utc().format("%Y-%m-%dT%H:%M:%SZ");
+ return time.to_utc().format_iso8601().to_string();
}
}