ALWAYS save time in the database as UTC/GMT rather than your local time as once you start messing with time and timezones you're in for a bad time. Let Appian do all the hard work for you. If you need to force particular scenarios then check out the following functions. Also, check out Tom Scott's rant on timezones HERE [emoticon:c4563cd7d5574777a71c318021cbbcc8]
https://docs.appian.com/suite/help/22.1/fnc_date_and_time_gmt.html
https://docs.appian.com/suite/help/22.1/fnc_date_and_time_timezone.html
https://docs.appian.com/suite/help/22.1/fnc_date_and_time_local.html
But my strong suggestion would be to avoid at all costs messing with time. Work it where you can that you save into the database UTC/GMT value and let Appian convert it in the front end.