Re: How to add 60 minutes to current time and have it properly

This WebDNA talk-list message is from

2005


It keeps the original formatting.
numero = 62865
interpreted = N
texte = That's kind of what I do this when setting 30-minute cookies, but make sure you allow for the time offset, in my case here in NJ it's 5 hours. Check to see if the projected expiration time falls between midnight and the cookie duration. Here's my code (showing the 5 hour offset): [setcookie name=[id]admin&value=allowed&path=/&expires=[format days_to_date %A, %d-%b-%Y][math]{[date]}[showif [math]{[time]}+{05:30:00}[/math]<[math]{00:30:00}[/math]]+{00/01/0000}[/showif][/math][/format] [math time]{[time]}+{05:30:00}[/math] GMT&domain=[getmimeheader host]] Terry At 2:00 AM -0700 8/27/05, WebDNA Talk wrote: >From: Dale's Lists >Subject: How to add 60 minutes to current time and have it properly > roll over to tomorrow >Date: Fri, 26 Aug 2005 21:39:47 -0500 > >WebDNS 6.0a on Linux >--- > >Hi, > >I am working on a session management process (using cookies) and am >getting stumped (probably something very simple) on adding 60 >minutes to the current time to extend the current session, yet >having it properly increment the date. > >Not sure if I should just check the seconds (using >[math]{[time]}[/math] ) value to see if it is between 0 and 3599 and >if it is, increment the date by 1, or if there is something built in >that I am missing. > >Thanks > >drt -- Terry Wilson | terry@terryfic.com | http://terryfic.com http://WhosComing.com - a simplified, affordable online reservation system http://TightPods.com -- stylish protection for your laptop -------------------------------------------------------------------------- Attitude is the only difference between ordeal and adventure. ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: How to add 60 minutes to current time and have it properly ( Terry Wilson 2005)
That's kind of what I do this when setting 30-minute cookies, but make sure you allow for the time offset, in my case here in NJ it's 5 hours. Check to see if the projected expiration time falls between midnight and the cookie duration. Here's my code (showing the 5 hour offset): [setcookie name=[id]admin&value=allowed&path=/&expires=[format days_to_date %A, %d-%b-%Y][math]{[date]}[showif [math]{[time]}+{05:30:00}[/math]<[math]{00:30:00}[/math]]+{00/01/0000}[/showif][/math][/format] [math time]{[time]}+{05:30:00}[/math] GMT&domain=[getmimeheader host]] Terry At 2:00 AM -0700 8/27/05, WebDNA Talk wrote: >From: Dale's Lists >Subject: How to add 60 minutes to current time and have it properly > roll over to tomorrow >Date: Fri, 26 Aug 2005 21:39:47 -0500 > >WebDNS 6.0a on Linux >--- > >Hi, > >I am working on a session management process (using cookies) and am >getting stumped (probably something very simple) on adding 60 >minutes to the current time to extend the current session, yet >having it properly increment the date. > >Not sure if I should just check the seconds (using >[math]{[time]}[/math] ) value to see if it is between 0 and 3599 and >if it is, increment the date by 1, or if there is something built in >that I am missing. > >Thanks > >drt -- Terry Wilson | terry@terryfic.com | http://terryfic.com http://WhosComing.com - a simplified, affordable online reservation system http://TightPods.com -- stylish protection for your laptop -------------------------------------------------------------------------- Attitude is the only difference between ordeal and adventure. ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Terry Wilson

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

test (2004) Webcat 3.0.5b9, b8 trigger failures ON WEBSTAR (1999) [HIDEIF] inside [FOUNDITEM] (1997) [showif [math (1999) Bulletin Board needed (2007) WebDNA 4.5 OS9 (2004) Exclamation point (1997) Expected Behavior? (1999) Re(7): Small Bug: ErrorLog.txt/[FORMVARIABLES]/[ORDERFILE] (1998) Price Not Appearing (2000) Mac Vs WindowsNT (1997) RE: IIS 4 (1998) How can I Add several Items into the cart at once? (1997) Forum - Test Request (2005) Squares instead of spaces (2001) Need relative path explanation (1997) sandbox is hogging 99% cpu cycles (2004) Multiple FlushDatabases (2000) Hummm .... (2002) Running _every_ page through WebCat-error.html (1997)