Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#2 | 2191485-commerce_sp-validity-field-should-user-date-timezone-handler.patch | 474 bytes | mstrelan |
Comments
Comment #1
mstrelan CreditAttribution: mstrelan commentedCorrected issue description. Apparently relative dates in rules evaluations are in GMT (although I suspect it means UTC).
Comment #2
mstrelan CreditAttribution: mstrelan commentedUsing "date's timezone" handling correctly sets the validity date and displays in the user's timezone.