flet-dev / flet

Flet enables developers to easily build realtime web, mobile and desktop apps in Python. No frontend experience required.
https://flet.dev
Apache License 2.0
11.56k stars 452 forks source link

Include client's time zone as part of `Page` object #4186

Open FeodorFitsner opened 1 month ago

FeodorFitsner commented 1 month ago

Discussed in https://github.com/flet-dev/flet/discussions/4175

More about time zone in Flutter:

We should pass two values from a dart client (which runs in the browser when app is a web app):

On Python side we create Flet implementation of datetime.tzinfo class which requires offset, DST adjustment (not sure about that) and zone name.

Later on in a user code tzinfo can be used with datetime, e.g. datetime.datetime.now(tz)