Wappler Version : 3.9.9
Operating System : W10
Server Model: NodeJS
Database Type: PostrgeSQL
Hosting Type: Local
For a field of type
timestamp in the DB, running a simple query like
select created_date from public.my_table should return the date time exactly as stored in the DB.
Running the same query in a DB app like DBeaver returns all values correctly.
Running the above query on my local machine, where timezone of the machine is set to IST (UTC +05:30), the
created_date fields gets converted to UTC based on the difference.
So, if value in DB is
2021-01-01 15:30, the query returns
2021-01-01T10:00.000z in the output.
How to reproduce
Setting up a simple table with timestamp data type in PostgeSQL should be enough to reproduce. Just make sure to set the machine’s time zone to something other than UTC to see the aut-conversion.
We tested an entire app on our local system, only to find out that in production server each and every logic where we are using such timestamp fields are showing incorrect data now.
Haven’t seen this before in Wappler with MySQL or MariaDB databases, so something wrong with PostgreSQL & NodeJS configuration in Wappler.