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

Simplify cookie expiry time calculation #906

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

pbearne
Copy link

@pbearne pbearne commented Nov 4, 2024

Pull Request Type

  • I have checked there is no other PR open for the same change.

This is a:

  • Bug fix
  • New feature
  • Documentation improvement
  • [ x] Code quality improvement

Context

Detailed Description

Replaces strtotime with DateTimeImmutable for calculating the cookie expiry time. This ensures more consistent behavior and improves code readability.

Quality assurance

  • [ x] This change does NOT contain a breaking change (fix or feature that would cause existing functionality to change).
  • [ x] I have commented my code, particularly in hard-to-understand areas.
  • I have added unit tests to accompany this PR.
  • [ x] The (new/existing) tests cover this PR 100%.
  • I have (manually) tested this code to the best of my abilities.
  • [x ] My code follows the style guidelines of this project.

Documentation

For new features:

  • I have added a code example showing how to use this feature to the examples directory.
  • I have added documentation about this feature to the docs directory.
    If the documentation is in a new markdown file, I have added a link to this new file to the Docs folder README.md file.

Paul Bearne added 3 commits November 4, 2024 18:36
Replaces `strtotime` with `DateTimeImmutable` for calculating the cookie expiry time. This ensures more consistent behavior and improves code readability.
Ensure the global namespace is used for DateTimeImmutable to avoid potential namespace conflicts. This change improves code reliability and maintains consistency throughout the file.
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.

1 participant