As per the title, the subscription expiration date field uses the user timezone, but the interval is calculated from "now" in GMT. This is not such a problem with annual subscriptions, but certainly is for 24 hour subscriptions.

        { "RULE" : {
            "IF" : [
              { "data_is_empty" : { "data" : [ "account:field-commerce-sp-validity" ] } }
            ],
            "DO" : [
              { "data_set" : { "data" : [ "account:field-commerce-sp-validity" ], "value" : "now" } }
            ],
            "LABEL" : "User has no subscription yet"
          }
        },

Is it possible to replace "now" with "now + user timezone offset"? Alternatively the expiration date field could be changed to use UTC, but this is less than ideal if you display the expiration date to the user.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mstrelan’s picture

Issue summary: View changes

Corrected issue description. Apparently relative dates in rules evaluations are in GMT (although I suspect it means UTC).

The date in GMT. You may enter a fixed time (like 2014-02-08 22:33:36) or any other values in GMT known by the PHP strtotime() function (like "+1 day"). Relative dates like "+1 day" or "now" relate to the evaluation time.

mstrelan’s picture

Using "date's timezone" handling correctly sets the validity date and displays in the user's timezone.