Skip to content

remove deprecated active_support.to_time_preserves_timezone (+billing tests)#4228

Open
akostadinov wants to merge 2 commits into3scale:masterfrom
akostadinov:to_time
Open

remove deprecated active_support.to_time_preserves_timezone (+billing tests)#4228
akostadinov wants to merge 2 commits into3scale:masterfrom
akostadinov:to_time

Conversation

@akostadinov
Copy link
Contributor

@akostadinov akostadinov commented Feb 18, 2026

This PR removes deprecated

config.active_support.to_time_preserves_timezone = false

And also adds some billing timezone related tests to hopefully assure that it doesn't affect our billing behavior.

Notes to reviewer:

  • If you are a normal person, just approve without ever reading any of the changes.
  • If you hate yourself, please review the added tests but ignore tests where TZ!=UTC because we don't officially support such configurations. Also please let me know whether my assessment of BUG comments makes sense to you. There are some BUGS in the SUPPORTED USE CASES!
  • If you hate all life and the whole universe, then you can review all tests.

If you are from the latter category of person and have a question why we even have TZ=whatever_else tests, I want to point out https://access.redhat.com/solutions/3418661 we state:

It would typically make the most sense if the traffic processed on the gateway is reported with timestamps matching the time zone settings in the admin and developer portals but it is not obligatory.

So please accept the TZ=whatever_else as descriptive of current behavior and not something to care about fixing at this moment. Although these tests might be useful in the event we decide to start supporting time zone aware billing.


# TODO: we may want to test some of these scenarios in post-paid mode too, mainly the double change test

# === Trial period plan change tests ===
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not review commented out tests! They are placeholders that I expect leave little if anything of..

Copy link
Contributor

@jlledom jlledom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you mixing to_time zone with billing tests?

@jlledom
Copy link
Contributor

jlledom commented Feb 24, 2026

Why are you mixing to_time zone with billing tests?

OK, the tests are about time zones...

@akostadinov akostadinov requested a review from jlledom February 26, 2026 08:58
@akostadinov akostadinov changed the title [WIP] remove deprecated active_support.to_time_preserves_timezone (+billing tests) remove deprecated active_support.to_time_preserves_timezone (+billing tests) Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants