-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Description
Preconditions and environment
- Magento any version
- Set the store timezone to America/Sao_Paulo for example
Steps to reproduce
- Set store timezone to America/Sao_Paulo
- Create date formElement in any ui component, example in category_form.xml:
-
Create the category attributes throught data patch, example:
`$eavSetup->addAttribute(
Category::ENTITY,
'promotion_start_date',
[
'type' => 'datetime',
'label' => 'Data Início da Promoção',
'input' => 'date',
'required' => false,
'sort_order' => 100,
'global' => ScopedAttributeInterface::SCOPE_GLOBAL,
'group' => 'PÁGINA DE PROMOÇÃO',
'backend' => \Magento\Eav\Model\Entity\Attribute\Backend\Datetime::class,
]
);$eavSetup->addAttribute( Category::ENTITY, 'promotion_end_date', [ 'type' => 'datetime', 'label' => 'Data Fim da Promoção', 'input' => 'date', 'required' => false, 'sort_order' => 110, 'global' => ScopedAttributeInterface::SCOPE_GLOBAL, 'group' => 'PÁGINA DE PROMOÇÃO', 'backend' => \Magento\Eav\Model\Entity\Attribute\Backend\Datetime::class, ] );` -
Use magento 2 /rest/all/V1/categories/ API to set a date in this fields request example:
{ "category": { "id": {{categoryId}}, "custom_attributes": [ { "attribute_code": "promotion_start_date", "value": "2025-12-06 23:06:11" }, { "attribute_code": "promotion_end_date", "value": "2025-12-08 22:21:11" } ] } } -
Check in the category changed form in the admin area that the time will be UTC-2 instead of UTC-3, Brazil doesn't have summer time changes anymore, so we are always UTC-3, the momentjs library is not updated towards this, and it has been a while since we had this change
Expected result
Have the frontend component be loaded to -3 hours from UTC
Actual result
The frontend component is being loaded -2 hours from UTC
Additional information
No response
Release note
No response
Triage and priority
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status