Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternate method for getting times in Drupal #1330

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

greg-does-weather
Copy link
Collaborator

What does this PR do? 🛠️

  • Installs uopz for PHP core method overwriting and clock-mock for time faking
  • Adds an Apache conditional so that if there is a time query parameter, it loads a setTime.php script before handing anything off to Drupal
  • Adds the setTime.php script which attempts to freeze time based on the time query parameter

With this, you can set Drupal's clock by providing a query parameter, like so:

http://localhost:8080/point/34.749/-92.275?time=2024-06-17T20:00:00-600

...which gives you Little Rock, AR, at 9 PM tonight, June 17, 2024.

What does the reviewer need to know?

I think this should work fine alongside what you have. If the setting is empty and the environment variable is unset, then this query parameter will work; otherwise, those two should take precedence.

@eric-gade eric-gade merged commit 5e19573 into eg-lets-control-time Jun 25, 2024
12 of 13 checks passed
@eric-gade eric-gade deleted the mgwalker/alt-for-drupal branch June 25, 2024 12:25
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