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:
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:
MOD_REWRITE Search Engine Friendly URLs (2008)
WebMerchant bomb (1998)
virtual domain service (1997)
Moment of Thanks (1997)
Max Record length restated as maybe bug (1997)
Summing Fields (1998)
WebCat2b13MacPlugIn - [showif][search][/showif] (1997)
case sensitivity in lookups (1997)
closedatabases simple question.. (2002)
Calculating multiple shipping... (1997)
WebCatalog2 Feature Feedback (1996)
Summing fields (1997)
access denied problem (1997)
WC2f3 (1997)
taxrate - off by 1 cent (1997)
founditems (2000)
sending formatted e-mail? (1998)
WebCat2.0 [format thousands .0f] no go (1997)
[include ...] behavior (1997)
Robert Minor duplicate mail (1997)