Solved

Creating a Cookie in Delphi 7 gets the wrong expiration time.

Posted on 2009-05-12
1
823 Views
Last Modified: 2013-11-23
I am trying to create a cookie that expires 20 minute from now. This is the code I am using.

At system out I get
12/05/2009 11:50:17 now: 12/5/2009 11:50:17
12/05/2009 11:50:17 now+20: 12/5/2009 12:10:17

which is correct.

However when I check the expiration time of the cookie this is what I get:
15:10:21 which is 3 hours and 20 minutes from now.

What am I doing wrong?
Response.SetCookieField(MyCookies, '', '/', Incminute(Now,20), False);

Open in new window

0
Comment
Question by:gbougiakas
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 21

Accepted Solution

by:
developmentguru earned 500 total points
ID: 24364136
I would check to see that the server time is correct and that there are no time zone differences.  Cookies are stored on the client system and ASP code is run, for the most part, on the server.  I would like to at least be able to rule that our before making another attempt.  Let me know how it goes.
0

Featured Post

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
Several part series to implement Internet Explorer 11 Enterprise Mode
Google currently has a new report that is in beta and coming soon to Webmaster Tool accounts. This Micro Tutorial will highlight new features for Google Webmaster Tools.
How to create a custom search shortcut to site-search Experts Exchange using Google in the Firefox browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch your Bookmark Menu: Press 'Ctrl +…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question