I have problem related datetime. If I try to save date to 20.4.2015 0:00:00 it goes to database 19.04.2015.21:00:00.
Somehow SDK changes datetime to -3 hour. (My timezone is +3h to UTC)
Where I can change this behaviour? Any tips?
The database uses UTC so that sounds about right. You can convert DateTime objects between UTC and Local using the .NET Datetime API.
Also make sure you specify the DateTime.Kind correctly when creating the DateTime object.
Okay I ask this more detailed. So Esri SDK makes all date values to UTC datetime. Why SDK doesn't convert those values back to related timezone?
Example I save value (UI) : 1.1.2000 0:00 GMT+3 -> Database its 31.12.1999 21:00 (Problem is bigger if DB field is on DATE)
Why SDK returns that 31.12.1999 21:00 not 1.1.2000 ?
31.12.1999 21:00 UTC is the exact same date as 01.01.2000 00:00 GMT+3.
It's the job of the app you build do input and output dates in the appropriate time zone for that app.
This is just how .NET handles dates - The Runtime ensures time zones doesn't cause dates across timezones to get mixed up by always saving in UTC.