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:
Setting up WebCatalog with Retail Pro data (1996)
sendmail spaces (1997)
Secure Server (1999)
OT: Typhoon (1998)
WebCat2b13MacPlugIn - [include] doesn't allow creator (1997)
WebCat & WebTen (1997)
Writing [raw] to a file (2000)
time and welcome (1999)
add to cart within a page? (1997)
[WebDNA] Security best practice (2009)
WriteFile (2000)
Limitations on fields? Server is crashing (1997)
WC2b15 File Corruption (1997)
For those of you not on the WebCatalog Beta... (1997)
Google MAP URLs (2006)
Nested Loops and SHOWIFs (1997)
includes and cart numbers (1997)
WebTV problems with WebCatalog?? (1998)
Attn: Bug in GeneralStore example b15 (1997)
Exclamation point (1997)