aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/module/xep/0082_date_time_profiles.vala
blob: 8b40d3ac64d98bb2d97ee2841807c49ed574590b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
namespace Xmpp.Xep.DateTimeProfiles {

public DateTime? parse_string(string time_string) {
     return new DateTime.from_iso8601(time_string, null);
}

public string to_datetime(DateTime time) {
     return time.to_utc().format_iso8601().to_string();
}

}