message: add utc-offset field

Add a new db field for storing UTC-offset for the Date: field.
This commit is contained in:
Dirk-Jan C. Binnema
2026-07-27 20:55:52 +03:00
committed by Seth Ladygo
parent 501d27ad89
commit 0bea84adce
5 changed files with 38 additions and 10 deletions

View File

@ -1047,12 +1047,19 @@ public:
return Mu::to_string_opt(g_mime_message_get_subject(self()));
}
using Date = std::pair<int64_t/*unix-time*/, int64_t/*utc-offset in secs*/>;
/**< Date type */
/**
* Gets the date if it exists, or nullopt otherwise.
* Gets a date, utf-offset pair if it exists, or nullopt otherwise.
*
* The date is the number of seconds since epoch (i.e., unix time),
* while utf-offset is the number of seconds offset from UTC
* (i.e., negative numbers west of GMT, positive numbers for east)
*
* @return a time_t value (expressed as a 64-bit number) or nullopt
*/
Option<int64_t> date() const noexcept;
Option<Date> date() const noexcept;
/**