ampil opened a new issue, #31790: URL: https://github.com/apache/superset/issues/31790
### Bug description The new [PR](https://github.com/apache/superset/pull/24263) introduced custom D3 datetime formatting. However, it works partially - when datetime format is forced to `%b`, `%B` for example. When the datetime is set to `Adaptive`, the custom datetime format ignored reverting back month names to English. How to reproduce the bug: Add a custom D3 Time format to `superset_config.py`: ``` D3_TIME_FORMAT = { "dateTime": "%d.%m.%Y %H:%M:%S", "date": "%d.%m.%Y", "time": "%H:%M:%S", "periods": ["AM", "PM"], "days": ["Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота", "Воскресенье"], "shortDays": ["Пон", "Вт", "Ср", "Чт", "Пт", "Сб", "Вс"], "months": ["Январь", "Февраль", "Март", "Апрель", "Май", "Июнь", "Июль", "Август", "Сентябрь", "Октябрь", "Ноябрь", "Декабрь"], "shortMonths": ["Янв", "Фев", "Мар", "Апр", "Май", "Июн", "Июл", "Авг", "Сен", "Окт", "Ноя", "Дек"] } ``` Create a virtual dataset with some data (PostgreSQL syntax): ``` select startdate::date as startdate , floor(random() * 100) + 1 AS random_integer from generate_series('2024-05-25', now(), '1 day'::interval) as startdate order by startdate desc; ``` Create a line chart with `start_date` on the X-axis, `random_integer` on the Y-axis:  Change X-axis datetime format to `%B`, note the changes:  ### Screenshots/recordings Another example related to the same behaviour: The custom D3 datetime format shows up when a certain datetime format applied, for example `%B`:   But in case an `adaptive` formatting applied on the X axis, the E3 formatting is reverting back to defaults (English):   ### Superset version 4.1.1 ### Python version 3.9 ### Node version 16 ### Browser Chrome ### Additional context _No response_ ### Checklist - [X] I have searched Superset docs and Slack and didn't find a solution to my problem. - [X] I have searched the GitHub issue tracker and didn't find a similar bug report. - [X] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
