Hello, hope all is fine!
I need help to figure out this problem:
My datatable have column ‘TIME’ return me data like this example:
17/08/2022 18:54:59
There is any think to convert the time to adapt it to differnt timezone of different users?
for exaple:
user_1 see the app from France
user_2 see the app from Usa
…
Thank you!
Anvil should, automatically, do conversion to and from the user’s time zone. If that isn’t working for you, you’ll need to give a lot more detail about your use case and why it isn’t working.
Hello, thanks for repley,
Yes i read the documentation and i put this on my server code:
datetime.now(anvil.tz.tzlocal()
then i do several try, im trying with my local hour (server_1) is match then on another server(server_2) with another local time is not make any conversion but return the hour of initial server (server_1)
Any idea how to fix it ?
Not until you show a lot more context. Remember, we can’t see everything you’re seeing. We can only see those parts that you show us. Right now, we just don’t have enough of the picture.
How i can take the column of time and convertit with anvil.tzlocal() ?
my datagrid are gied from:
self.repeating_panel_1.items = app_tables.my_table.search(tables.order_by(“TIME”,ascending=False))
Go through the tutorial on data grids. The last part of it shows putting components onto a data grid row to make it editable. You can put any component on, not just edit fields. You could put a label on, for example, and then set its text property.