app/services/waste_carriers_engine/expiry_date_service.rb
# expires_on is stored as a Time in UTC and then converted to a Date.
# If a user first registered near midnight around the transition between GMT
# and BST (or the other way round), there is a risk that the UTC date will
# not be the same as the UK date. So compensate to avoid flagging something
# as expired on the wrong date.
expires_on is stored as a Time in UTC and then converted to a Date.
If a user first registered near midnight around the transition between GMT
and BST (or the other way round), there is a risk that the UTC date will
not be the same as the UK date. So compensate to avoid flagging something
as expired on the wrong date.
expires_on is stored as a Time in UTC and then converted to a Date . If a user first registered near midnight around the transition between GMT and BST ( or the other way round ) there is a risk that the UTC date will not be the same as the UK date . So compensate to avoid flagging something as expired on the wrong date .
def corrected_expires_on
      return if expires_on.nil?
      return expires_on + 1.hour if registered_in_bst_and_expires_in_gmt?
      return expires_on - 1.hour if registered_in_gmt_and_expires_in_bst?
      expires_on
    end
def corrected_expires_on return if expires_on . nil? return expires_on + 1 . hour if registered_in_bst_and_expires_in_gmt? return expires_on - 1 . hour if registered_in_gmt_and_expires_in_bst? expires_on end
expires_on is stored as a Time in UTC and then converted to a Date.
expires_on is stored as a Time in UTC and then converted to a Date .