Re: Problem with Midnight

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 48292
interpreted = N
texte = For these sorts of timeout values, I store the timestamp for expiration as a combination of the days since 2001 * 10000 + seconds from midnight. My algorithim is:[math show=F]mTemp=floor({[time]}/60)+[iMinutes][/math] [if [mTemp] > 1440] [then][!] ** need Tomorrow [/!] [math show=F]mTemp=[mTemp]-1440+(({[date]}+1-{1/1/2001})*10000)[/math] [/then][else] [math show=F]mTemp=[mTemp]+(({[date]}-{1/1/2001})*10000)[/math] [/else][/if]where [iMinutes] is the number of minutes until the login should timeout.Essentially, calculate the time for the timeout. If greater that 1440 (minutes in a day) then we use tomorrow's date and subtract 1440 from the time. Otherwise we use today's date.I subtract the date 1/1/2001 from the date to get a smaller number, multiply by 10000 (to be larger than the time value can be), then add the seconds from midnight.- brianOn Monday, March 3, 2003, at 02:58 PM, Nitai @ ComputerOil wrote:> Hi all > > I have not found solution to this, so I am asking the group. > > I have a login and logout timer in a system. I add to the logout time > 30 > minutes so I can see how long the user is in the system. Anyhow, > somehow my > users always get logged off the system between 11.30 and 12.00 pm. > > I can see that there is a problem with date and time so I thought I > can do > this: > > [math]{[date]}[/math][math]{[time]}[/math] > > This should add the date and time together and should overpass the > midnight > problem. > > Somehow this still does not work and user get logged out. > > Anybody got a suggestion? > > Sincerely, > Nitai Aventaggiato > CEO > > -- > Tools to energize your business > Content Management & eBusiness Systems > > ComputerOil™ GmbH http://computeroil.com/ > Unionstrasse 4 info@computeroil.com > 8032 Zürich/Switzerland > Tel: +41 (0)43 333 1 555 > -- Brian Fries, BrainScan Software -- http://www.brainscansoftware.com -- ------------------------------------------------------------- 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: Problem with Midnight (Kenneth Grome 2003)
  2. Re: Problem with Midnight (Nitai @ ComputerOil 2003)
  3. Re: Problem with Midnight (Kenneth Grome 2003)
  4. Re: Problem with Midnight (Brian Fries 2003)
  5. Problem with Midnight (Nitai @ ComputerOil 2003)
For these sorts of timeout values, I store the timestamp for expiration as a combination of the days since 2001 * 10000 + seconds from midnight. My algorithim is:[math show=F]mTemp=floor({[time]}/60)+[iMinutes][/math] [if [mTemp] > 1440] [then][!] ** need Tomorrow [/!] [math show=F]mTemp=[mTemp]-1440+(({[date]}+1-{1/1/2001})*10000)[/math] [/then][else] [math show=F]mTemp=[mTemp]+(({[date]}-{1/1/2001})*10000)[/math] [/else][/if]where [iMinutes] is the number of minutes until the login should timeout.Essentially, calculate the time for the timeout. If greater that 1440 (minutes in a day) then we use tomorrow's date and subtract 1440 from the time. Otherwise we use today's date.I subtract the date 1/1/2001 from the date to get a smaller number, multiply by 10000 (to be larger than the time value can be), then add the seconds from midnight.- brianOn Monday, March 3, 2003, at 02:58 PM, Nitai @ ComputerOil wrote:> Hi all > > I have not found solution to this, so I am asking the group. > > I have a login and logout timer in a system. I add to the logout time > 30 > minutes so I can see how long the user is in the system. Anyhow, > somehow my > users always get logged off the system between 11.30 and 12.00 pm. > > I can see that there is a problem with date and time so I thought I > can do > this: > > [math]{[date]}[/math][math]{[time]}[/math] > > This should add the date and time together and should overpass the > midnight > problem. > > Somehow this still does not work and user get logged out. > > Anybody got a suggestion? > > Sincerely, > Nitai Aventaggiato > CEO > > -- > Tools to energize your business > Content Management & eBusiness Systems > > ComputerOil™ GmbH http://computeroil.com/ > Unionstrasse 4 info@computeroil.com > 8032 Zürich/Switzerland > Tel: +41 (0)43 333 1 555 > -- Brian Fries, BrainScan Software -- http://www.brainscansoftware.com -- ------------------------------------------------------------- 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/ Brian Fries

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:

Help name our technology! (1997) wc 2 pro users - sites, quotes wanted (1997) writing db to disk (1997) WebCatalog NT beta 18 now available (1997) WebMerchant Only reads 1.4 order files error (1997) WC2b15 - [HTMLx]...[/HTMLx] problems (1997) search same field twice??? (1999) 404s - Apache vs. WebDNA (2008) International Orders (1998) [UPPERCASE] (1997) Date search - yes or no (1997) Sorting error (1997) Stinkin' [Referrer] (1998) TCPsend with POST? (1999) Width & Height (1998) A question on sub-categories (1997) Stopping bad HTML propagation ? (1997) Several requests (2003) [WebDNA] Grep (2009) Beta List (1998)