Issue with date/time being changed to UTC (probably not a Wappler issue)

Hey,

Hoping someone can offer some advice as not sure if this is happening because of NodeJS, PostgreSQL, Wappler or my fault :slight_smile:

I have a separate DATE and TIME field in a PostgreSQL database that i have added together in a query to give a date/time result in a single field. I simple use + in the query and it works fine:

historical_imports."date" + historical_imports."interval" AS date_interval

Note that the Time field in the DB is NOT defined as a timezone field, Postgres has separate time and timtz data types, and this is just time.

The result i get (in Navicat) seems perfectly fine and as expected:
image

When this data is displayed in Wappler though, it gets CHANGED (not converted) to be a UTC time such as:
image

The problem is that the time this event occurred was 8:00am in MY time, not 8am in UTC time. SO when i change the formatting in Wappler to me more user friendly, it converts the time to the local time, and throws it off my 10 hours.

Any ideas what i can do here?

To me it seems that perhaps in Postgres, when i add DATE + TIME it changes it to be a timezone field, but i’m not sure how to check or change this as its calculated in the query and i can’t simply change the data type?

Or is it something to do with NodeJS or Wappler reading a date/time field and making it show as UTC time?

Any thoughts much appreciated. For now i have just subtracted 10 hours in App Connect, but that it just a temporary solution and can’t remain that way.

Community Page
Last updated: