Time zones in Perspective

I have a problem here:
on the same screen... how can I get the local time from my pc? I need to use this since the screen I am using could be opened in other countries.
I have tried using system.date.now(). But it only returns me the local time of the server

try with minus or plus timezone offset value exctracted from DataBase
or get datetime from DataBase

1 Like

Don't use the database. That will give the database timezone. Use the Perspective Session property timeZoneId.


Application ideas here:

However, note that most Perspective Components will handle timezone conversions (including locale formatting) for you if you simply leave standard java datetime objects in your data (java.util.Date is built on milliseconds UTC), or provide long integer milliseconds-UTC in your data. In some components, like the table, you might have to request datetime formatting to engage this handling.

1 Like