We have an app that is being used by clients on different location. The app timezone is based on user location. We have an API that is deployed on a server which the timezone is UTC, and the database is in CST. This is causing issues when it comes to ordering parts. The code I have is:
total(case when (wo.Order <= current_timestamp + interval '1' day)
current_timestamp is in UTC, wo.Order is in CST, and user is in different timezone based on location. What is the best way to approach this problem? Should I make the server & DB same time or do I need to locate user location?