Recently, Now() has been generating and storing inconsistent DateTime values in my SQL Databse when "previewing" apps in the online web developer.
I've been running into this issue when testing an app in the online web developer. What happens is that after editing an app for a while (about 30-60 min), I enter "Preview the App" and create / send a new record to my SQL database using the Now() function to capture the current date and time. What has been happening is that the first record I create generates a seemingly-random DateTIme value (sometimes off by a day, sometimes a couple of hours, sometimes more than a day, etc...). If I then create a second record in the App Preview, however, it generates and stores the correct date and time that it should (the time that the Now() function was orginally called ... when I loaded the web developer about 30-60 minutes prior.)
A few notes :
- I am in PTC timezone ( -8 ) and I know that PowerApps uses UTC, thus I adjust for this when viewing the dates sent from PowerApps into SQL. This is not a timezone issue, given I notice these random DateTime values when I view the dates directly in the SQL database.
- When Now() is behaving properly, it sends the correct time (in my PTC timezone) into the SQL database and I view these as correct.
Given these Now() values are random and "correct" themselves after creating a second record, I am to believe that this is a bug in the "Preview App" mode of the online developer tool.