This code was working yesterday but not now. I haven't changed anything... Why is that and how can i fix it?
{
var info = TimeZoneInfo.FindSystemTimeZoneById("Turkey Standard Time");
DateTimeOffset localServerTime = DateTimeOffset.Now;
DateTimeOffset istanbulTime = TimeZoneInfo.ConvertTime(localServerTime, info);
con.Open();
cmd.CommandText = "UPDATE BilgisayarDuyuru SET date='" + istanbulTime + "' WHERE id='" + id + "'";
cmd.ExecuteNonQuery();
con.Close();
}