Harmonize / optimize how the datetime is stored and retrieved.
Currently, dates are stored in sql server without timezone and in some code parts they are populated with the system time of the machine where .net runs (DateTime.Now) and in some the sql server function (getdate()). When system time in sql server and .net host is different the stored datetime information is inconsistent across different fields.
Suggested fix with in mind that .net hosts, if multiple, always use the same timezone.
-
use only .net to populate datetime -
add optional configuration to a docker to define system timezone other than default GMT+0 (UTC)
Note, in installation with multiple transfer service instances where every machine has a different local time the solution above will still produce an inconsistent result. So, alternatively, consider storing datetime as datetimeoffset data type in SQL server.
Edited by Aleksei Arhipov