Solved

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

Posted on 2009-05-12
1
819 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
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

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

I had to do a bit of research to find the answer to this question so I thought I'd share my results.  Due to our outdated mainframe systems, we need to downgrade IE9 to IE8 in order to stay compatible.  We also needed to downgrade Java.  In order to…
I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
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.
This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.

706 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now