GmailScheduler icon indicating copy to clipboard operation
GmailScheduler copied to clipboard

UTC fixes

Open thapar opened this issue 9 years ago • 5 comments

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 avatar Feb 26 '15 08:02 thapar

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.

thapar avatar Feb 26 '15 08:02 thapar

@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.

webdigi avatar Feb 26 '15 08:02 webdigi

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 < [email protected]> 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.

thapar avatar Feb 26 '15 08:02 thapar

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.

webdigi avatar Feb 26 '15 08:02 webdigi

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 < [email protected]> 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.

thapar avatar Feb 26 '15 17:02 thapar