Time Range Search Bug #1666
Replies: 2 comments 2 replies
-
According to the documentation for the DeliveredAfter, DeliveredOn, and DeliveredBefore queries:
These SearchQuery methods map to IMAP's
I know it's confusing and non-intuitive due to the fact that these query methods take a If you want to search for messages with the level of specificity that you are trying to do, you'll need an IMAP server that supports the WITHIN extension. You can check for this extension by doing: if (client.Capabilities.HasFlag(ImapCapabilities.Within)) If the IMAP server supports DateTime starttime = new DateTime(2023, 11, 15, 0, 0, 0, DateTimeKind.Utc);
DateTime endtime = new DateTime(2023, 11, 15, 23, 59, 59, DateTimeKind.Utc);
var query = SearchQuery.YoungerThan((int) (DateTime.Utc.Now - starttime).TotalSeconds).And(SearchQuery.OlderThan((int) (DateTime.Utc.Now - endtime).TotalSeconds)); |
Beta Was this translation helpful? Give feedback.
-
Hi @jstedfast |
Beta Was this translation helpful? Give feedback.
-
There are 3 emails in Outlook, with the email times being: 2023/11/15 08:35:32+08:00,2023/11/15 07:30:13+00:00,2023/11/15 00:51:27-08:00.
When endtime = new DateTime(2023, 11, 15, 23, 59, 59, DateTimeKind.Utc) return 0 count;
When endtime = new DateTime(2023, 11, 16, 0, 0, 0, DateTimeKind.Utc) return 3 count;
There is a bug in the international email time range search.
Beta Was this translation helpful? Give feedback.
All reactions