sid
October 2, 2020, 12:02pm
1
Wappler Version : 3.3.3
Operating System : Windows 10
Expected behavior
Using formatDate(‘HH:mm:ss’) should return the time part of the date.
Actual behavior
Applying this function to NOW_UTC in server action returns local time.
How to reproduce
I created two variables in server action - one is set to NOW_UTC and other is set to NOW_UTC.formatDate()
This is the response I get on the browser.
Teodor
October 2, 2020, 12:09pm
2
What server model are you using, as i tested on PHP and it works fine:
{
"test_utc": "12:09:11"
}
sid
October 2, 2020, 12:18pm
3
Ah. Forgot to mention. Asp.NET . Local server.
sid
October 2, 2020, 12:32pm
5
Seeing this on the dateAdd
function also. Maybe other functions also have the same issue.
If you guys can give a quick fix file, or include it in today’s update, it would be really helpful.
sid
October 2, 2020, 12:38pm
6
One more observation: day_next.toUTCTime()
& day_next.toLocalTime()
functions are causing exception too.
The toTimestamp
, toLocalTime
and toUTCTime
where never added to ASP.NET
. Will see if I can add them and check out the problem with NOW_UTC
.
Here an update for you to test.
Formatter.zip (19.2 KB)
sid
October 7, 2020, 4:16am
9
Thanks for the update. Things are working now.
formatDate
and dateAdd
are working as expected now.
day_next.toUTCTime()
and day_next.toLocalTime()
both don’t throw errors anymore.
With day_next as UTC (1), toLocalTime()
is returning UTC time (2). Running this on my local machine. So it should return in IST, just like regular NOW
does.