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

Add a new {timezone} placeholder #26

Merged
merged 1 commit into from
Apr 27, 2020
Merged

Conversation

stevegrunwell
Copy link
Contributor

This PR adds a {timezone} placeholder, which works by calling $next_interval_start->format('T'), giving us the abbreviated version (e.g. "EST", "MDT", etc.) while also accounting for daylight saving time.

For future reference, we're using the next interval's start time as this placeholder is more likely to be used for when orders will be accepted again rather than when the current interval started. This avoids embarassing situations like "Please check back on $date at $time EST" when $date is in EDT.

Fixes #22.

This commit adds a `{timezone}` placeholder, which works by calling `$next_interval_start->format('T')`, giving us the abbreviated version (e.g. "EST", "MDT", etc.) while also accounting for daylight saving time.

For future reference, we're using the *next* interval's start time as this placeholder is more likely to be used for when orders will be accepted again rather than when the current interval started. This avoids embarassing situations like "Please check back on $date at $time EST" when `$date` is in EDT.

Fixes #22.
@stevegrunwell stevegrunwell added the enhancement New feature or request label Apr 27, 2020
@stevegrunwell stevegrunwell added this to the Version 1.2.0 milestone Apr 27, 2020
@stevegrunwell stevegrunwell requested a review from bswatson April 27, 2020 20:45
@bswatson bswatson merged commit cbfcacb into develop Apr 27, 2020
@bswatson bswatson deleted the feature/timezone-placeholder branch April 27, 2020 21:07
@stevegrunwell stevegrunwell mentioned this pull request Apr 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

{timezone} Placeholder
2 participants