[🐛 BUG] Timezone problem on initialization #2229
Labels
🖰 GUI
Related to GUI
🆘 Help wanted
Open to participation from the community
💥Malfunction
Addresses an identified problem.
🟨 Priority: Medium
Not blocking but should be addressed
What went wrong? 🤔
I have a question about how Taipy manages date and time. I see that Gui().run has timezone parameter, that defaults to client.
When I instantiate a variable with datetime.datetime.now(), I think this uses the server's local datetime.
What I observe by playing around with it, is that when a date is modified from a date visual element, that date is stored in GMT, but is displayed, in the date element, in the selected timezone.
I see 2 potential problems:
1- The timezone that I use to initialize the values is not GMT (unless the server is in a GMT zone). So this can lead to inconsistencies.
2- If I display the date in a text() element, I get the GMT date, but the date element shows the timezone I selected within run().
Date and time is always a painful thing, so I don't know if this is a bug, or if I'm being too maniac. This is not a technical bug, it would be a malfunction at most.
Expected Behavior
Time zones should be consistent acoss visual elements, and across time.
If Taipy uses GMT datetimes, values should always e in GMT, even if they are initialized before the run() (I think that is one of the problems, but I'm not 100% sure).
Steps to Reproduce Issue
This code helps to reproduce the issue, but you need to interact to data element to see it better:
Runtime Environment
Windows 10, I used Python 12 within Anaconda, Taipy develop
Browsers
Brave
OS
Windows
Version of Taipy
4.0.0
Acceptance Criteria
Code of Conduct
The text was updated successfully, but these errors were encountered: