One user was creating a new case at 9:10pm last night and discovered that the auto current date given to the open date of the case was set to "tomorrow" (today).
I know the servers are close to Portugal somewhere and all its event timers are in their time.
But this is an issue for me and many others. There must be a solution.
How do I set my application date and time to be U.S. EST?
Unfortunately, this is something you'll have to manage yourself. There is nothing built into the platform to handle time zones. There is a component TimeZones that can get you started with this but it's probably not a complete solution. For example, you would need to store all your time/date values in the database in some common time zone, usually UTC, and then convert back and forth anytime the value is viewed or stored. If you have people from several time zones using your web site you'll need to track that in their user profile someplace most likely.
As you noted, this has an effect on timers too.
I started investigating this when I was involved in a project that had the same issue. Unfortunately the project was cancelled so I don't have any code, just my ideas for implementing this.
Hope this helps,
What environment are you using? Amazone cloud? Personal cloud?
Kilian Hekhuis wrote:
I am on OutSystems enterprise environment. I am not using my own servers.
I figure this should be a big deal for anyone using OutSystems since if I was in California or another area, using the CurrDate() would be even more of a problem.
I cannot believe there is not an easy solution for this.
Is the time zone you are trying to use static? If so its just a matter of calculating the offset between the time zone and the server.
Otherwise you will have to do as Curt mentioned, and have time zone as a setting per user/tenant and calculate the offset based on that settings value.
Justin Babel wrote:
Static. It is always 4 hours ahead.
Since you do not have access to the servers, and already have the data stored in the DB under the other time zone. I would suggest using the TimeZones component and using the action ConvertFromTimeZone (converts datetime from source time zone to destination time zone) when displaying a date/time to the user on the UI.
You can wrap this action with the desired time zones, just passing in the date/time so you do not have to worry about passing the time zone parameters to that action every time you call it, rather just pass in a date/time and return a date/time.
So you would still store the data as the other time zone, but display it in the desired time zone (EST or whatever).
Let me know if this helps,