webdigi / GmailScheduler

Google app script system to allow gmail / google business apps users to schedule outgoing messages & to set messages to return to inbox
Other
102 stars 36 forks source link

UTC fixes #14

Open thapar opened 9 years ago

thapar commented 9 years ago

Although https://github.com/webdigi/GmailScheduler/pull/13 removed some troubling code, there still seems to be an issue where SugarJS is maintaining the timezone of the user and mixing it up with the time zone of the server (it seems). Forcing the GmailScheduler script to use UTC is the sane solution to dealing with people in different time zones.

HOWEVER, before merging this pull request, I highly recommend you create a new Google Apps Script project and transfer your current project there to use as a test project. Put this code in that new Google Apps Script project, which will serve as a sandbox. Then enable me (or anyone else in a different timezone as you) to test the script by checking the Log window in Google Apps' script editor.

thapar commented 9 years ago

Upon further inspection, this may be the culprit: https://code.google.com/p/google-apps-script-issues/issues/detail?id=2845

Meaning we will need to manually calculate the timezone offset from the UTC and then do some math before showing the user a time.

webdigi commented 9 years ago

@thapar - Please upload https://github.com/webdigi/GmailScheduler/tree/master/src under your account. We can then test that fully under the account you create. Since you are an active contributor it might be best if you have a separate working copy in your google scripts account.

thapar commented 9 years ago

I do have a working copy. But it doesn't help me to test since I'm in my own timezone :-) Therefore, if you create a second copy for testing under your account, I can test that copy for the timezone issue.

On Thu, Feb 26, 2015 at 3:26 AM, Webdigi - Web Development < notifications@github.com> wrote:

@thapar https://github.com/thapar - Please upload https://github.com/webdigi/GmailScheduler/tree/master/src under your account. We can then test that fully under the account you create. Since you are an active contributor it might be best if you have a separate working copy in your google scripts account.

— Reply to this email directly or view it on GitHub https://github.com/webdigi/GmailScheduler/pull/14#issuecomment-76139481.

webdigi commented 9 years ago

Yes, understood. Can you please paste a screenshot of Scripts (of your demo install) -> File -> Project properties and change the timezone. You should be able to change that timezone to test.

thapar commented 9 years ago

Changing that timezone changes the whole timezone in use, so that doesn't help in testing. I can provide the screenshot, but I'd need your private email address to send it.

On Thu, Feb 26, 2015 at 3:43 AM, Webdigi - Web Development < notifications@github.com> wrote:

Yes, understood. Can you please paste a screenshot of Scripts (of your demo install) -> File -> Project properties and change the timezone. You should be able to change that timezone to test.

— Reply to this email directly or view it on GitHub https://github.com/webdigi/GmailScheduler/pull/14#issuecomment-76141272.