-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Show and edit date in the same timezone #6167
Merged
jordisala1991
merged 1 commit into
sonata-project:3.x
from
peter-gribanov:show_and_edit_date_tz
Jul 24, 2020
Merged
Show and edit date in the same timezone #6167
jordisala1991
merged 1 commit into
sonata-project:3.x
from
peter-gribanov:show_and_edit_date_tz
Jul 24, 2020
Conversation
This file contains 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
phansys
previously approved these changes
Jun 25, 2020
core23
reviewed
Jun 26, 2020
core23
previously approved these changes
Jun 26, 2020
peter-gribanov
force-pushed
the
show_and_edit_date_tz
branch
from
June 26, 2020 13:26
4c79b51
to
b3efa0e
Compare
core23
previously approved these changes
Jun 26, 2020
phansys
previously approved these changes
Jul 22, 2020
jordisala1991
previously approved these changes
Jul 23, 2020
Phpstan is failing, you probably only need to rebase, can you do it @peter-gribanov ? |
add convert timezone test optimize convert timezone not use assign operation inside the if condition test change datetime on change timezone create named datasets
peter-gribanov
dismissed stale reviews from jordisala1991, phansys, and core23
via
July 24, 2020 12:22
f11b482
peter-gribanov
force-pushed
the
show_and_edit_date_tz
branch
from
July 24, 2020 12:22
b3efa0e
to
f11b482
Compare
@jordisala1991 Yes. Sure |
jordisala1991
approved these changes
Jul 24, 2020
Thank you @peter-gribanov |
peter-gribanov
added a commit
to peter-gribanov/SonataAdminBundle
that referenced
this pull request
Jul 24, 2020
allow use data_transformer in SetObjectFieldValueAction create BooleanToStringTransformer for allows to use non-strings update SetObjectFieldValueActionTest use yoda conditions fix errors in HelperControllerTest test BooleanToStringTransformer allow override transformers for 'date', 'boolean' and 'choice' field types mark BooleanToStringTransformer and BooleanToStringTransformer classes as final add example of using the data_transformer option in docs add full docs about Symfony Data Transformers optimize resolve Data Transformer fix docs create DataTransformerResolver service add type hint for BooleanToStringTransformer::$trueValue allow add a custom global transformers field type should be a string correct default value for $globalCustomTransformers correct test DataTransformerResolverTest::testAddCustomGlobalTransformer() add BC support usage of DataTransformerResolver Update tests/Action/SetObjectFieldValueActionTest.php Update tests/Action/SetObjectFieldValueActionTest.php Update tests/Form/DataTransformer/BooleanToStringTransformerTest.php Update tests/Form/DataTransformer/BooleanToStringTransformerTest.php Update tests/Form/DataTransformerResolverTest.php Update tests/Form/DataTransformerResolverTest.php Update src/Action/SetObjectFieldValueAction.php change "entity" word to "model" in documentations change deprecated error message add datetime in editable date form types correct test transform datetime and date form types test DateTime object in assertSame() fix typo restore getTemplate() return value in SetObjectFieldValueActionTest use Yoda conditions lazy-load predefined data transformers add DataTransformerResolverInterface use constants for determinate a field type test laze-load data transformers test usage DataTransformerResolver::addCustomGlobalTransformer() create simple function in DataTransformerResolverTest Process deprecation of FieldDescriptionInterface::getTargetEntity() Use FieldDescriptionInterface::getTargetModel if exists sonata-project#6208 change usage getTargetEntity() -> getTargetModel() in DataTransformerResolverTest merge changes from PR sonata-project#6167 register BooleanToStringTransformer as a service
peter-gribanov
added a commit
to peter-gribanov/SonataAdminBundle
that referenced
this pull request
Jul 24, 2020
allow use data_transformer in SetObjectFieldValueAction create BooleanToStringTransformer for allows to use non-strings update SetObjectFieldValueActionTest use yoda conditions fix errors in HelperControllerTest test BooleanToStringTransformer allow override transformers for 'date', 'boolean' and 'choice' field types mark BooleanToStringTransformer and BooleanToStringTransformer classes as final add example of using the data_transformer option in docs add full docs about Symfony Data Transformers optimize resolve Data Transformer fix docs create DataTransformerResolver service add type hint for BooleanToStringTransformer::$trueValue allow add a custom global transformers field type should be a string correct default value for $globalCustomTransformers correct test DataTransformerResolverTest::testAddCustomGlobalTransformer() add BC support usage of DataTransformerResolver Update tests/Action/SetObjectFieldValueActionTest.php Update tests/Action/SetObjectFieldValueActionTest.php Update tests/Form/DataTransformer/BooleanToStringTransformerTest.php Update tests/Form/DataTransformer/BooleanToStringTransformerTest.php Update tests/Form/DataTransformerResolverTest.php Update tests/Form/DataTransformerResolverTest.php Update src/Action/SetObjectFieldValueAction.php change "entity" word to "model" in documentations change deprecated error message add datetime in editable date form types correct test transform datetime and date form types test DateTime object in assertSame() fix typo restore getTemplate() return value in SetObjectFieldValueActionTest use Yoda conditions lazy-load predefined data transformers add DataTransformerResolverInterface use constants for determinate a field type test laze-load data transformers test usage DataTransformerResolver::addCustomGlobalTransformer() create simple function in DataTransformerResolverTest Process deprecation of FieldDescriptionInterface::getTargetEntity() Use FieldDescriptionInterface::getTargetModel if exists sonata-project#6208 change usage getTargetEntity() -> getTargetModel() in DataTransformerResolverTest merge changes from PR sonata-project#6167 register BooleanToStringTransformer as a service
peter-gribanov
added a commit
to peter-gribanov/SonataAdminBundle
that referenced
this pull request
Jul 24, 2020
allow use data_transformer in SetObjectFieldValueAction create BooleanToStringTransformer for allows to use non-strings update SetObjectFieldValueActionTest use yoda conditions fix errors in HelperControllerTest test BooleanToStringTransformer allow override transformers for 'date', 'boolean' and 'choice' field types mark BooleanToStringTransformer and BooleanToStringTransformer classes as final add example of using the data_transformer option in docs add full docs about Symfony Data Transformers optimize resolve Data Transformer fix docs create DataTransformerResolver service add type hint for BooleanToStringTransformer::$trueValue allow add a custom global transformers field type should be a string correct default value for $globalCustomTransformers correct test DataTransformerResolverTest::testAddCustomGlobalTransformer() add BC support usage of DataTransformerResolver Update tests/Action/SetObjectFieldValueActionTest.php Update tests/Action/SetObjectFieldValueActionTest.php Update tests/Form/DataTransformer/BooleanToStringTransformerTest.php Update tests/Form/DataTransformer/BooleanToStringTransformerTest.php Update tests/Form/DataTransformerResolverTest.php Update tests/Form/DataTransformerResolverTest.php Update src/Action/SetObjectFieldValueAction.php change "entity" word to "model" in documentations change deprecated error message add datetime in editable date form types correct test transform datetime and date form types test DateTime object in assertSame() fix typo restore getTemplate() return value in SetObjectFieldValueActionTest use Yoda conditions lazy-load predefined data transformers add DataTransformerResolverInterface use constants for determinate a field type test laze-load data transformers test usage DataTransformerResolver::addCustomGlobalTransformer() create simple function in DataTransformerResolverTest Process deprecation of FieldDescriptionInterface::getTargetEntity() Use FieldDescriptionInterface::getTargetModel if exists sonata-project#6208 change usage getTargetEntity() -> getTargetModel() in DataTransformerResolverTest merge changes from PR sonata-project#6167 register BooleanToStringTransformer as a service
peter-gribanov
added a commit
to peter-gribanov/SonataAdminBundle
that referenced
this pull request
Jul 27, 2020
allow use data_transformer in SetObjectFieldValueAction create BooleanToStringTransformer for allows to use non-strings update SetObjectFieldValueActionTest use yoda conditions fix errors in HelperControllerTest test BooleanToStringTransformer allow override transformers for 'date', 'boolean' and 'choice' field types mark BooleanToStringTransformer and BooleanToStringTransformer classes as final add example of using the data_transformer option in docs add full docs about Symfony Data Transformers optimize resolve Data Transformer fix docs create DataTransformerResolver service add type hint for BooleanToStringTransformer::$trueValue allow add a custom global transformers field type should be a string correct default value for $globalCustomTransformers correct test DataTransformerResolverTest::testAddCustomGlobalTransformer() add BC support usage of DataTransformerResolver Update tests/Action/SetObjectFieldValueActionTest.php Update tests/Action/SetObjectFieldValueActionTest.php Update tests/Form/DataTransformer/BooleanToStringTransformerTest.php Update tests/Form/DataTransformer/BooleanToStringTransformerTest.php Update tests/Form/DataTransformerResolverTest.php Update tests/Form/DataTransformerResolverTest.php Update src/Action/SetObjectFieldValueAction.php change "entity" word to "model" in documentations change deprecated error message add datetime in editable date form types correct test transform datetime and date form types test DateTime object in assertSame() fix typo restore getTemplate() return value in SetObjectFieldValueActionTest use Yoda conditions lazy-load predefined data transformers add DataTransformerResolverInterface use constants for determinate a field type test laze-load data transformers test usage DataTransformerResolver::addCustomGlobalTransformer() create simple function in DataTransformerResolverTest Process deprecation of FieldDescriptionInterface::getTargetEntity() Use FieldDescriptionInterface::getTargetModel if exists sonata-project#6208 change usage getTargetEntity() -> getTargetModel() in DataTransformerResolverTest merge changes from PR sonata-project#6167 register BooleanToStringTransformer as a service
peter-gribanov
added a commit
to peter-gribanov/SonataAdminBundle
that referenced
this pull request
Jul 27, 2020
allow use data_transformer in SetObjectFieldValueAction create BooleanToStringTransformer for allows to use non-strings update SetObjectFieldValueActionTest use yoda conditions fix errors in HelperControllerTest test BooleanToStringTransformer allow override transformers for 'date', 'boolean' and 'choice' field types mark BooleanToStringTransformer and BooleanToStringTransformer classes as final add example of using the data_transformer option in docs add full docs about Symfony Data Transformers optimize resolve Data Transformer fix docs create DataTransformerResolver service add type hint for BooleanToStringTransformer::$trueValue allow add a custom global transformers field type should be a string correct default value for $globalCustomTransformers correct test DataTransformerResolverTest::testAddCustomGlobalTransformer() add BC support usage of DataTransformerResolver Update tests/Action/SetObjectFieldValueActionTest.php Update tests/Action/SetObjectFieldValueActionTest.php Update tests/Form/DataTransformer/BooleanToStringTransformerTest.php Update tests/Form/DataTransformer/BooleanToStringTransformerTest.php Update tests/Form/DataTransformerResolverTest.php Update tests/Form/DataTransformerResolverTest.php Update src/Action/SetObjectFieldValueAction.php change "entity" word to "model" in documentations change deprecated error message add datetime in editable date form types correct test transform datetime and date form types test DateTime object in assertSame() fix typo restore getTemplate() return value in SetObjectFieldValueActionTest use Yoda conditions lazy-load predefined data transformers add DataTransformerResolverInterface use constants for determinate a field type test laze-load data transformers test usage DataTransformerResolver::addCustomGlobalTransformer() create simple function in DataTransformerResolverTest Process deprecation of FieldDescriptionInterface::getTargetEntity() Use FieldDescriptionInterface::getTargetModel if exists sonata-project#6208 change usage getTargetEntity() -> getTargetModel() in DataTransformerResolverTest merge changes from PR sonata-project#6167 register BooleanToStringTransformer as a service merge changes from PR sonata-project#6144
peter-gribanov
added a commit
to peter-gribanov/SonataAdminBundle
that referenced
this pull request
Jul 27, 2020
allow use data_transformer in SetObjectFieldValueAction create BooleanToStringTransformer for allows to use non-strings update SetObjectFieldValueActionTest use yoda conditions fix errors in HelperControllerTest test BooleanToStringTransformer allow override transformers for 'date', 'boolean' and 'choice' field types mark BooleanToStringTransformer and BooleanToStringTransformer classes as final add example of using the data_transformer option in docs add full docs about Symfony Data Transformers optimize resolve Data Transformer fix docs create DataTransformerResolver service add type hint for BooleanToStringTransformer::$trueValue allow add a custom global transformers field type should be a string correct default value for $globalCustomTransformers correct test DataTransformerResolverTest::testAddCustomGlobalTransformer() add BC support usage of DataTransformerResolver Update tests/Action/SetObjectFieldValueActionTest.php Update tests/Form/DataTransformer/BooleanToStringTransformerTest.php Update tests/Form/DataTransformerResolverTest.php Update src/Action/SetObjectFieldValueAction.php change "entity" word to "model" in documentations change deprecated error message add datetime in editable date form types correct test transform datetime and date form types test DateTime object in assertSame() fix typo restore getTemplate() return value in SetObjectFieldValueActionTest use Yoda conditions lazy-load predefined data transformers add DataTransformerResolverInterface use constants for determinate a field type test laze-load data transformers test usage DataTransformerResolver::addCustomGlobalTransformer() create simple function in DataTransformerResolverTest Process deprecation of FieldDescriptionInterface::getTargetEntity() Use FieldDescriptionInterface::getTargetModel if exists sonata-project#6208 change usage getTargetEntity() -> getTargetModel() in DataTransformerResolverTest merge changes from PR sonata-project#6167 register BooleanToStringTransformer as a service merge changes from PR sonata-project#6144
peter-gribanov
added a commit
to peter-gribanov/SonataAdminBundle
that referenced
this pull request
Sep 4, 2020
allow use data_transformer in SetObjectFieldValueAction create BooleanToStringTransformer for allows to use non-strings update SetObjectFieldValueActionTest use yoda conditions fix errors in HelperControllerTest test BooleanToStringTransformer allow override transformers for 'date', 'boolean' and 'choice' field types mark BooleanToStringTransformer and BooleanToStringTransformer classes as final add example of using the data_transformer option in docs add full docs about Symfony Data Transformers optimize resolve Data Transformer fix docs create DataTransformerResolver service add type hint for BooleanToStringTransformer::$trueValue allow add a custom global transformers field type should be a string correct default value for $globalCustomTransformers correct test DataTransformerResolverTest::testAddCustomGlobalTransformer() add BC support usage of DataTransformerResolver Update tests/Action/SetObjectFieldValueActionTest.php Update tests/Form/DataTransformer/BooleanToStringTransformerTest.php Update tests/Form/DataTransformerResolverTest.php Update src/Action/SetObjectFieldValueAction.php change "entity" word to "model" in documentations change deprecated error message add datetime in editable date form types correct test transform datetime and date form types test DateTime object in assertSame() fix typo restore getTemplate() return value in SetObjectFieldValueActionTest use Yoda conditions lazy-load predefined data transformers add DataTransformerResolverInterface use constants for determinate a field type test laze-load data transformers test usage DataTransformerResolver::addCustomGlobalTransformer() create simple function in DataTransformerResolverTest Process deprecation of FieldDescriptionInterface::getTargetEntity() Use FieldDescriptionInterface::getTargetModel if exists sonata-project#6208 change usage getTargetEntity() -> getTargetModel() in DataTransformerResolverTest merge changes from PR sonata-project#6167 register BooleanToStringTransformer as a service merge changes from PR sonata-project#6144 Move internal configuration to PHP sonata-project#6284
peter-gribanov
added a commit
to peter-gribanov/SonataAdminBundle
that referenced
this pull request
Sep 4, 2020
allow use data_transformer in SetObjectFieldValueAction create BooleanToStringTransformer for allows to use non-strings update SetObjectFieldValueActionTest use yoda conditions fix errors in HelperControllerTest test BooleanToStringTransformer allow override transformers for 'date', 'boolean' and 'choice' field types mark BooleanToStringTransformer and BooleanToStringTransformer classes as final add example of using the data_transformer option in docs add full docs about Symfony Data Transformers optimize resolve Data Transformer fix docs create DataTransformerResolver service add type hint for BooleanToStringTransformer::$trueValue allow add a custom global transformers field type should be a string correct default value for $globalCustomTransformers correct test DataTransformerResolverTest::testAddCustomGlobalTransformer() add BC support usage of DataTransformerResolver Update tests/Action/SetObjectFieldValueActionTest.php Update tests/Form/DataTransformer/BooleanToStringTransformerTest.php Update tests/Form/DataTransformerResolverTest.php Update src/Action/SetObjectFieldValueAction.php change "entity" word to "model" in documentations change deprecated error message add datetime in editable date form types correct test transform datetime and date form types test DateTime object in assertSame() fix typo restore getTemplate() return value in SetObjectFieldValueActionTest use Yoda conditions lazy-load predefined data transformers add DataTransformerResolverInterface use constants for determinate a field type test laze-load data transformers test usage DataTransformerResolver::addCustomGlobalTransformer() create simple function in DataTransformerResolverTest Process deprecation of FieldDescriptionInterface::getTargetEntity() Use FieldDescriptionInterface::getTargetModel if exists sonata-project#6208 change usage getTargetEntity() -> getTargetModel() in DataTransformerResolverTest merge changes from PR sonata-project#6167 register BooleanToStringTransformer as a service merge changes from PR sonata-project#6144 Move internal configuration to PHP sonata-project#6284
peter-gribanov
added a commit
to peter-gribanov/SonataAdminBundle
that referenced
this pull request
Sep 7, 2020
allow use data_transformer in SetObjectFieldValueAction create BooleanToStringTransformer for allows to use non-strings update SetObjectFieldValueActionTest use yoda conditions fix errors in HelperControllerTest test BooleanToStringTransformer allow override transformers for 'date', 'boolean' and 'choice' field types mark BooleanToStringTransformer and BooleanToStringTransformer classes as final add example of using the data_transformer option in docs add full docs about Symfony Data Transformers optimize resolve Data Transformer fix docs create DataTransformerResolver service add type hint for BooleanToStringTransformer::$trueValue allow add a custom global transformers field type should be a string correct default value for $globalCustomTransformers correct test DataTransformerResolverTest::testAddCustomGlobalTransformer() add BC support usage of DataTransformerResolver Update tests/Action/SetObjectFieldValueActionTest.php Update tests/Form/DataTransformer/BooleanToStringTransformerTest.php Update tests/Form/DataTransformerResolverTest.php Update src/Action/SetObjectFieldValueAction.php change "entity" word to "model" in documentations change deprecated error message add datetime in editable date form types correct test transform datetime and date form types test DateTime object in assertSame() fix typo restore getTemplate() return value in SetObjectFieldValueActionTest use Yoda conditions lazy-load predefined data transformers add DataTransformerResolverInterface use constants for determinate a field type test laze-load data transformers test usage DataTransformerResolver::addCustomGlobalTransformer() create simple function in DataTransformerResolverTest Process deprecation of FieldDescriptionInterface::getTargetEntity() Use FieldDescriptionInterface::getTargetModel if exists sonata-project#6208 change usage getTargetEntity() -> getTargetModel() in DataTransformerResolverTest merge changes from PR sonata-project#6167 register BooleanToStringTransformer as a service merge changes from PR sonata-project#6144 merge changes from PR sonata-project#6284 compare date with time in DataTransformerResolverTest
VincentLanglet
pushed a commit
that referenced
this pull request
Sep 13, 2020
allow use data_transformer in SetObjectFieldValueAction create BooleanToStringTransformer for allows to use non-strings update SetObjectFieldValueActionTest use yoda conditions fix errors in HelperControllerTest test BooleanToStringTransformer allow override transformers for 'date', 'boolean' and 'choice' field types mark BooleanToStringTransformer and BooleanToStringTransformer classes as final add example of using the data_transformer option in docs add full docs about Symfony Data Transformers optimize resolve Data Transformer fix docs create DataTransformerResolver service add type hint for BooleanToStringTransformer::$trueValue allow add a custom global transformers field type should be a string correct default value for $globalCustomTransformers correct test DataTransformerResolverTest::testAddCustomGlobalTransformer() add BC support usage of DataTransformerResolver Update tests/Action/SetObjectFieldValueActionTest.php Update tests/Form/DataTransformer/BooleanToStringTransformerTest.php Update tests/Form/DataTransformerResolverTest.php Update src/Action/SetObjectFieldValueAction.php change "entity" word to "model" in documentations change deprecated error message add datetime in editable date form types correct test transform datetime and date form types test DateTime object in assertSame() fix typo restore getTemplate() return value in SetObjectFieldValueActionTest use Yoda conditions lazy-load predefined data transformers add DataTransformerResolverInterface use constants for determinate a field type test laze-load data transformers test usage DataTransformerResolver::addCustomGlobalTransformer() create simple function in DataTransformerResolverTest Process deprecation of FieldDescriptionInterface::getTargetEntity() Use FieldDescriptionInterface::getTargetModel if exists #6208 change usage getTargetEntity() -> getTargetModel() in DataTransformerResolverTest merge changes from PR #6167 register BooleanToStringTransformer as a service merge changes from PR #6144 merge changes from PR #6284 compare date with time in DataTransformerResolverTest
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.
Subject
The
date
anddatetime
field has atimezone
option that is used as second argument for Twig'sdate
function (doc).It seems wrong to me that the date is displayed in one time zone, and is being live-edited in another time zone. Due to the difference between the server time zone and the time zone specified in the options, we can get completely different dates, which can lead to administrative errors.
I assume that the time zone is used so that the administrator can specify his time zone and not look at all the dates in the server time zone. This is useful because JavaScript calendars do not know in which time zone the server is located and display the calendar in the user's time zone. If the time zone of the server and the user are different, this can also lead to problems.
Changelog