Closed (won't fix)
Project:
Rules
Version:
7.x-2.x-dev
Component:
Scheduler
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
16 Feb 2012 at 02:00 UTC
Updated:
18 Feb 2012 at 23:52 UTC
site has timezone set.
created a date field.
Dates get stored in the DB in local time.
Scheduler component uses that date field, expects time to be in UTC, but it is stored in local time --> scheduled item is off by the difference.
As I understand it this is a bug in scheduler. Please correct me if I am wrong.
If it is a bug, would the devs be willing to accept a patch?
Thanks,
Shiraz
Comments
Comment #1
fagoHow have you configured your scheduler? Using data-selection or maybe by using tokens?
Comment #2
shiraz dindarHi Fago,
Thank you for your response, all your coding work on entities, and especially your attention to the issue queues!
The goal is to send out an email 5 days before a date as set in a field.
The scheduler component has a "scheduled evaluation date" using a data-selector of the date field. There is no direct input for this, thus no token availability.
Below that, in the "add offset" section, I have -5 days. But, as mentioned, it is subtracting 5 days from the date with the expectation that it is stored in GMT, when in fact it is stored in local time.
In the offset section, there is the option to use direct input with a value that gets fed straight into strtotime(), and as the context help says, one can use strtotime's offsetting directly, but here too strtotime() is expecting a GMT date, as also stated in the context help.
But you know, the more I think about this, the more I realize that it's understandable that rules expects dates to be stored in GMT/UTC. Trying to patch rules to account for timezone would mean that it would have to find out from date how a given date field is stored, which may not be trivial. I'm going to call this issue null, and simply change my date fields to store via UTC....
Thanks for your attention in any case!!
Shiraz
Comment #3
shiraz dindar