Scott M.
9/6/2006 3:05:00 PM
Cookies can be set by the client and/or the server. Since this is an
ASP.NET newsgroup, I assume you are doing server-side setting of the
cookies. Why can't you have the server obtain the time zone of the client
(perhaps through the servervariables collection) and adjust the expiration
date/time of the cookie accordingly?
"Ram" <Ram@discussions.microsoft.com> wrote in message
news:AD89F86D-7FE7-4C7D-A9B0-CD9228463D1E@microsoft.com...
> hi
>
> i can't change my client local time, could you please more elobrate on
> your
> reply.
>
> Ram
>
>
>
> "Scott M." wrote:
>
>> Work with GMT, rather than local times?
>>
>>
>> "Ram" <Ram@discussions.microsoft.com> wrote in message
>> news:165CAD0C-5668-4422-A1C7-29482AD1C1CA@microsoft.com...
>> > Hi
>> >
>> > I am using cookie to store unique encrypted token, i want to use the
>> > cookie
>> > expire time 8 hours.
>> >
>> > I doing like below to expire:
>> > Cookie.Expres = DateTime.Now.AddHours(8)
>> >
>> > Its working in my local system as both are in same time zones. I got
>> > the
>> > problem when I deployed my application to Server, unfortunatley this
>> > server
>> > is in GMT time zone and my client is in GMT+5:30 time zone, So when i
>> > login
>> > to my ASP.NET application cookie expiration is taking I hour + some
>> > minutes
>> > more to expire. I can even see this in my cookie file expires attribute
>> > in
>> > my
>> > local machine.
>> >
>> > How to set cookie expire property when server and client are in
>> > diffrent
>> > timezones.
>> >
>> > Could anybody help me as it is become critical ?
>>
>>
>>