anotherim-desktop/xmpp-vala/src/module/xep/0082_date_time_profiles.vala

13 lines
255 B
Vala
Raw Normal View History

namespace Xmpp.Xep.DateTimeProfiles {
2017-08-16 09:44:42 +00:00
public DateTime? parse_string(string time_string) {
2020-10-27 14:31:39 +00:00
return new DateTime.from_iso8601(time_string, null);
2017-08-16 09:44:42 +00:00
}
2017-08-22 10:13:11 +00:00
2017-08-12 21:14:50 +00:00
public string to_datetime(DateTime time) {
2020-10-27 14:31:39 +00:00
return time.to_utc().format_iso8601().to_string();
}
2017-08-12 21:14:50 +00:00
}