mparlak / Flee

Fast Lightweight Expression Evaluator
630 stars 121 forks source link

Attempting to access TimeSpan.TotalHours gives Common Language Runtime detected an invalid program. #111

Open MauriceCalvert opened 8 months ago

MauriceCalvert commented 8 months ago

Using the expression engine, I add these variables and formulas:

variable "startTimestamp" = "2023-04-01 09:03:25" variable "endTimestamp" = "2023-04-01 09:34:54" variable "startlat" = 461706632 variable "startlong" = 61615299 formula "Duration" = "endtimestamp-starttimestamp" formula "Hours" = "Duration.TotalHours" formula "StartLatitude" = "startlat/10000000.0" formula "StartLongitude" = "startlong/10000000.0"

Recalculate throws Exception thrown: 'System.InvalidProgramException' in Flee.dll

The other formulas work as expected: image

I've tried "Duration.TotalHours()", same result.

Suggestions to fix this would be welcome