diff src/core/time.cc @ 319:d928ec7b6a0d

services/kitsu: implement GetAnimeList() it finally works!
author Paper <paper@paper.us.eu.org>
date Wed, 12 Jun 2024 17:52:26 -0400
parents da2c5a8ff306
children
line wrap: on
line diff
--- a/src/core/time.cc	Wed Jun 12 05:25:41 2024 -0400
+++ b/src/core/time.cc	Wed Jun 12 17:52:26 2024 -0400
@@ -98,4 +98,8 @@
 	return QDateTime::currentDateTime().toUTC().toSecsSinceEpoch();
 }
 
+Timestamp ParseISO8601Time(const std::string& str) {
+	return QDateTime::fromString(Strings::ToQString(str), Qt::ISODateWithMs).toUTC().toSecsSinceEpoch();
+}
+
 } // namespace Time