I've been having headaches with dates in Appian and I think it has to do with the way appian handles timezones.
Unless I'm mistaken, appian is supposed to record dates in GMT then then later read them in whatever local time zone is appropriate. What I'm finding is that it records in the local time zone, then later reads it as though it were GMT and adjusts to the local time zone, resulting in incorrect dates.
The more frustrating thing about this is how I access/display the date affects what gets shown.
For example if I use a date picker, appian records the date as 4 hours earlier. Thus 8/8/2025 will be recorded in the db as 8/7/2025 8:00 pm EDT
If I display the date in a text field, I'll get 8/7/2025 8:00 pm EDT, but if I put it through any kind of function such as text() to format what it looks like it'll come out as 8/8/2025.
What's worse is I imported a csv of a bunch of legacy data and the dates were all converted to date/time and had the 4 hours subtracted when recorded.
How can I keep this from happening?
Discussion posts and replies are publicly visible
https://appian.rocks/2023/02/13/working-with-time-in-appian/
I actually read through that before posting, but my problem here is that no matter how I adjust the time, it records as EDT/EST, even if the time is inaccurate. If I use a date picker, it will translate that to local time, making it a day earlier, and even if I use GMT() to translate it to the right date, the timezone it records is still EDT/EST. I want the time zone tag to be correct for the time I'm recording and it seems bizarre to me that these time zone adjustment functions like local() and gmt() don't allow you to set the time zone, just add/subtract time.
Do you use the Appian cloud database? If not, did you make sure that your DB server runs in GMT?
Appian treats dates/datetimes only in GMT! Internally! As soon as such a value becomes visible, it is translated into the users timezone.
It is simple, but you can build yourself a ugly trap once you try to translate dates yourself.
I understand that Appian treats datetimes only in GMT. The DB server is not Appian cloud and not in GMT, which is what is causing all the trouble. I don't have any control over the server though. It's run by the client and they want it to be EST.
So what do I do about it?