MarkMpn / Sql4Cds

SQL 4 CDS core engine and XrmToolbox tool
MIT License
74 stars 22 forks source link

Use Bulk Delete option - start time off by time zone #380

Closed akaskela closed 9 months ago

akaskela commented 10 months ago

Hi @MarkMpn, thanks for the awesome tool. I noticed a minor issue when I tried to delete records with the Use Bulk Delete operations checked. The bulk delete process is created correctly but the start time doesn't handle timezones correctly. My user is EST (UTC-4) and when I run the delete at 12:00 it's created with a scheduled time of 16:00.

MarkMpn commented 10 months ago

Is it possible that your Windows setup is on a different time zone from the Dataverse user profile, e.g. Windows is on EST but you're connecting with an application user which is set to UTC?

At the moment it's using DateTime.Now to schedule it, which follows the Microsoft sample code. I can try changing it to DateTime.UtcNow and see if that works, but it's worth checking if your user profile settings are consistent as well.