Date Time Component - secondsUntil Using Local Time Instead of UTC

Wappler Version : 3.4.0
Operating System : Windows 10

Expected behavior

Using date format functions such as secondsUntil, should calculate seconds remaining from the parameters passed.

Actual behavior

When supplying a date time component set to UTC Time, the secondsUntil function calculates the value using local time.
Even using the toUTCDate() function does not make a difference.

How to reproduce

<dmx-datetime id="dateTimeNow" utc="true"></dmx-datetime>
  1. Date Time component with UTC Time enabled.
  2. Result of secondsUntil function.
  3. Value of date time param supplied to calculate seconds (which is a UTC date time).

What I have tried:

  1. Remove the UTC time check and use it directly. Response is same as what I am getting right now, but that is expected and correct.
  2. Add toUTCDate() function to date time component and the parameter both. Result is still seconds calculated using local time which is incorrect.

Using ASP.NET, but not sure if this is server model specific since this is a client side function.

Community Page
Last updated: