Bug discovered in GmailApp.search()

121 views
Skip to first unread message

Finn Smith

unread,
May 31, 2022, 9:02:24 AM5/31/22
to Google Apps Script Community
I think I've discovered a bug in GmailApp.search(). If you use time parameters (e.g. "before:2022-05-22") in GAS, it goes off of UTC, but if you do the same search in the Gmail app or desktop UI, it uses your local timezone.

This is just a heads up, as I thought it might be important for some of you. I've filed a bug for this (issue #233865151).

cbmserv...@gmail.com

unread,
Jun 1, 2022, 11:28:09 PM6/1/22
to google-apps-sc...@googlegroups.com

Timezones are problematic things to work with. There are ways to setup timezones in your script, in your spreadsheets, and of course on your browser/pc

 

It is probably a timezone setup wrongly somewhere which gets you the different behaviours.

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/878e9fdb-95ff-4682-9086-1ace1c4f38c9n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages