We’re using Azure for the webgui and database hosting. If you use the “Current date and time”, it takes the Azure server local time / utc0. Not the client time, which can be in a different time zone.
Is it possible to display the client time in the webgui reports instead of the server time? I prefer to solve this in the DevExpress report if possible.
There is probably a workaround possible using some database functions and storing the users time zone in the database, but that is not preferred.
Best answer by René W
Hi Edo, that's unfortunate. But I’ve posted an idea for this:
We currently have a workaround that stores the time zone in a table using sys.time_zone_info. Then whe use a helper function that does a query like below:
declare @date_time datetime2 = '2020-11-12 07:57:00' -- this value must be UTC0.select convert(datetime2, @date_time attimezone'UTC'attimezone'Hawaiian Standard Time') -- returns 2020-11-1121:57select tzi.name
, tzi.current_utc_offset
, convert(datetime2, @date_time attimezone'UTC'attimezone tzi.name) as local_time
from sys.time_zone_info tzi
We currently have a workaround that stores the time zone in a table using sys.time_zone_info. Then whe use a helper function that does a query like below:
declare @date_time datetime2 = '2020-11-12 07:57:00' -- this value must be UTC0.select convert(datetime2, @date_time attimezone'UTC'attimezone'Hawaiian Standard Time') -- returns 2020-11-1121:57select tzi.name
, tzi.current_utc_offset
, convert(datetime2, @date_time attimezone'UTC'attimezone tzi.name) as local_time
from sys.time_zone_info tzi
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.