Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想格式化 aQString以保存时间戳的描述,该时间戳与 RFC 2822 格式中指定的 UTC 的偏移量如下所示:
QString
+0800
对于 8 小时的正偏移,或
-0100
对于 1 小时的负偏移量。
我已经研究了官方文档,QDateTime QDateTime::fromString(const QString & string, const QString & format)但我无法真正弄清楚我必须在调用中的格式字符串中使用哪种语法来完成此操作。
QDateTime QDateTime::fromString(const QString & string, const QString & format)
那么我应该如何进行呢?