GmailScheduler icon indicating copy to clipboard operation
GmailScheduler copied to clipboard

Issue with dates and times

Open KurtRussellCM3 opened this issue 10 years ago • 13 comments

It is 10:30 pm Central Time (Chicago, Mexico City). If I create a label that says "5:00 am today," it makes a correct label that states "The label 5:00 am today would trigger the email on Sunday September 14, 2014 5:00:00am." If I create a label that says "4:00 am today," it comes back with this message: "Invalid date to "Date in the past / Cannot find date from label name."" The problem continues with times earlier than 4:00 am, such as 3:00 am or 2:00 am. There is no problem for times after 5:00 am such as 6:00 am or 7:00 am. Is there a problem with the date being separate from the GMT? GMT is 6 hours different from Central Time. The error seems to happen six hours in the future. Also, if I put 4:00 am tomorrow, it creates a label too far into the future, Monday September 14. Thank you.

KurtRussellCM3 avatar Sep 14 '14 03:09 KurtRussellCM3

Thanks for the report. If you go into the settings page is the correct timezone selected?

webdigi avatar Sep 15 '14 15:09 webdigi

Sorry for the late reply. Yes, I have the correct timezone selected. Besides, if the change from "today" and "tomorrow" in the labels is midnight, the labels I set for say "7:00 am today" should have an error message, because that is in the past. I use "today" because it sends the email when I want it to send (eight and a half hours in the future), but technically I should be making the label as "7:00 am tomorrow." The error of being in the past only comes up within six hours because GMT is six hours ahead of my time, making my date switch at 2400 GMT, not at 2400 CST, at least that's my guess. I think it is coded so that the time is CST but the date is GMT. But anyway, Gmail Scheduler is very helpful to me. Thank you for making it/servicing it. Sorry to whine about it.

KurtRussellCM3 avatar Sep 17 '14 04:09 KurtRussellCM3

Thanks for more details on the report.

Yes, it should not allow you to set labels that generate dates in the past.

Can you please

  1. Attach a screenshot of the page where it says "7 am today"?
  2. Attach a screenshot of 1 second later
  3. Attach a screenshot of 1 day later
  4. Attach a screenshot of next sunday at 7am In all screenshots it will be useful if you can grab the screenshot with the computer clock / current time on your selected timezone.

webdigi avatar Sep 19 '14 09:09 webdigi

7:00 am today 7am

KurtRussellCM3 avatar Sep 20 '14 04:09 KurtRussellCM3

1 second later 1sec

KurtRussellCM3 avatar Sep 20 '14 04:09 KurtRussellCM3

1 day later 1day

KurtRussellCM3 avatar Sep 20 '14 04:09 KurtRussellCM3

next Sunday at 7:00 am nextsunday

KurtRussellCM3 avatar Sep 20 '14 04:09 KurtRussellCM3

And just to show that I can't get it to send at 4:00 am, five-ish hours from now here is 4:00 am today and 4:00 am tomorrow, respectively. 4today 4tomorrow

KurtRussellCM3 avatar Sep 20 '14 04:09 KurtRussellCM3

Thanks again for the help. Sorry to bother you.

KurtRussellCM3 avatar Sep 20 '14 04:09 KurtRussellCM3

@KurtRussellCM3 Why would you expect "4am today" to create a label for tomorrow's date of 4am?

thapar avatar Jan 28 '15 16:01 thapar

@KurtRussellCM3 - Please check and we can close once @thapar confirms.

webdigi avatar Feb 24 '15 16:02 webdigi

I explained very thoroughly. Please reread my posts, and you should be able to understand the problem.

On Tue, Feb 24, 2015 at 10:30 AM, Webdigi - Web Development < [email protected]> wrote:

@KurtRussellCM3 https://github.com/KurtRussellCM3 - Please check and we can close once @thapar https://github.com/thapar confirms.

— Reply to this email directly or view it on GitHub https://github.com/webdigi/GmailScheduler/issues/3#issuecomment-75790215 .

KurtRussellCM3 avatar Mar 07 '15 05:03 KurtRussellCM3

@KurtRussellCM3, there is a bug in a native function of Google App Scripts itself: https://code.google.com/p/google-apps-script-issues/issues/detail?id=2845

Meaning, GmailScheduler needs to manually calculate the timezone offset from the UTC and then do some math before showing the user a time. It should work properly after such an approach is implemented.

thapar avatar Mar 07 '15 05:03 thapar