-
Notifications
You must be signed in to change notification settings - Fork 38
Description
I'm very thankful for your project and I'm using it. However I found one small problem. Basically, at least with my timezone "EDT" (Eastern Daylight Saving Time), localTimezone_()
returns "EDT", but when Gmail.Utils.formatDate
calls Utilities.formatDate(message.getDate(), timezone, format)
, it has problems taking "EDT" as the timezone input, and end up using "GMT" instead as the timezone. Therefore it ends up returning a date formatted with GMT timezone, not local timezone. While the format string is such that it still says "EDT", therefore the datetime string is wrong. (here)
I did find that (a hack) if I use Utilities.formatDate()
and it would return "America/New_York", and with that as the timezone input, it gets Utilities.formatDate() working correctly. Hence the below work-around:
//my work-around
function myFormatDate(message, format) {
return Utilities.formatDate(message.getDate(), Session.getScriptTimeZone(), format);
}
I'm using my work-around to replace Gmail.Utils.formatDate
, but want to report this issue. Thx!