Infer timezone in DateTime field handler#126
Merged
jhedstrom merged 2 commits intojhedstrom:masterfrom Mar 20, 2018
jonathanjfshaw:patch-2
Merged
Infer timezone in DateTime field handler#126jhedstrom merged 2 commits intojhedstrom:masterfrom jonathanjfshaw:patch-2
jhedstrom merged 2 commits intojhedstrom:masterfrom
jonathanjfshaw:patch-2
Conversation
Contributor
Author
|
We may want to ensure forwards compatibility with https://www.drupal.org/node/2632040 |
Contributor
Author
|
I now know that forward-compatibility with https://www.drupal.org/node/2632040 is not an issue. We could add extra logic for that, but it won't invalidate what I suggest here. |
Owner
|
Should this go in before or after #167? |
Contributor
Author
|
It doesn't need to wait on #167.
As i said in #167 there is a case for a big picture discussion on date
handling (which would define all the desired features including this one),
and then once that's done making date_range extend date.
But I see no great harm in adding features like this piecemeal, these
handlers are still pretty simple.
…On Monday, 19 March 2018, Jonathan Hedstrom ***@***.***> wrote:
Should this go in before or after #167
<#167>?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#126 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADWYQaFF5KG3CyCvp3NWzbGyvL05s26vks5tf_G6gaJpZM4MoE4X>
.
|
Owner
|
Makes sense to me. Thanks for this! |
|
This created an issue in #200 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I thought I had already made PR for this but I can't find it, forgive me if I'm being foolish.
Currently the following scenario will fail most of the time:
It will typically fail because values are by default created and stored using UTC, but rendered using the current user's timezone. The workaround is for step authors to do mental time math, writing their "Given" times in UTC and their "Then" times in the Drupal timzeone (which is the default for any user).
I think we should assume that step authors intend time values to be in the Drupal default timezone when they write them in Given statements, unless they explicitly specify a timezone.
This will break BC for anyone writing tortured scenarios expecting the current behavior.
I can write some tests for it in the extension, if you like the idea of this.