Tech Off Post

Single Post Permalink

View Thread: Cookie Question
  • User profile image

    PeterF wrote:
    The time in the cookie would be in GMT, so you also wouldn't have the issue with time zones or winter time, but if you really want to expire it (time on server and time on client can be slightly off) expire it with:

    cookie.Expires = DateTime.Now.AddYears(-1);

    How would you figure out time zone of DateTime. How to adjust for GMT? I am curious about a more precise answer if anyone has one.