I've ran into the following issue with displaying LastActivityDate values. The date/time stored in DB is the UTC time and that is how it should be. However, when I am trying to display that time in User Local Time I am getting incorrect results. I determine User's offset and DST upon signup and store the values in db. So for example I am in the EST so the offset value for me is -300 minutes and DST is True.
Then I want to display a particular user's (or for all users) LastActivityDate value.
Dim vCurrentUser As MembershipUser = Membership.GetUser("someuser")
Response.Write(vCurrentUser.LastActivityDate)
And I see this: 9/7/2012 12:52:45 PM which is the server's local time and not UTC as stored in DB. So apparently there is some internal conversion going on. Is there some setting that I can change to avoid this behavior? Of course I can do some additional formatting and convert that server time to UTC again an ...
Go to the complete details ...