Re: Date as number and Cart partially explained

This WebDNA talk-list message is from

2001


It keeps the original formatting.
numero = 38802
interpreted = N
texte = Brian B. Burton wrote: > > The first 11 digits of the [cart] are based on the time. I haven't decoded > how it encodes the time... It seems to be accurate to the ticks of the clock > of the computer (on the mac this is 1/60th of a sec; how this relates > NT/Linux, I don't know) it's always divisible by 2, I'll keep factoring to > find the constant when I get a chance. (code at bottom for those who like to > play)NT typically measures time in either seconds or milliseconds (depending on which API you call). All of my carts are now 16 digits long, so under NT, I would suspect that the first 13 digits are milliseconds since the epoch ( midnight (00:00:00), January 1, 1970 ).10 digits are currently required to represent the number of seconds since the epoch, see http://www.james.rcpt.to/2001/epoch/for more details. On the Mac, the ticks are more granular, so it uses 11 digits: 10 + number of 1/60th's (which will always be even).HTHJohn-- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4720 Boston Way Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5747------------------------------------------------------------- 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://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Date as number and Cart partially explained (John Peacock 2001)
Brian B. Burton wrote: > > The first 11 digits of the [cart] are based on the time. I haven't decoded > how it encodes the time... It seems to be accurate to the ticks of the clock > of the computer (on the mac this is 1/60th of a sec; how this relates > NT/Linux, I don't know) it's always divisible by 2, I'll keep factoring to > find the constant when I get a chance. (code at bottom for those who like to > play)NT typically measures time in either seconds or milliseconds (depending on which API you call). All of my carts are now 16 digits long, so under NT, I would suspect that the first 13 digits are milliseconds since the epoch ( midnight (00:00:00), January 1, 1970 ).10 digits are currently required to represent the number of seconds since the epoch, see http://www.james.rcpt.to/2001/epoch/for more details. On the Mac, the ticks are more granular, so it uses 11 digits: 10 + number of 1/60th's (which will always be even).HTHJohn-- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4720 Boston Way Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5747------------------------------------------------------------- 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://search.smithmicro.com/ John Peacock

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:

[subtotal] problems -- help? (1998) [addlineitems] display (1997) Forms Search Questions (1997) possible, WebCat2.0 and checkboxes-restated (1997) [convertchars] problem... (2000) Nested vs conditional (1997) Bounced Emails (2005) Smith Micro Site (2000) 2nd WebCatalog2 Feature Request (1996) Code sample - links.tpl (2002) Database Changes (2000) Sendmail and textarea (1998) test (2003) Frames and WebCat (1997) referrer usage (1997) [WebDNA] Bug in [thisurlplusget] on v7 (2011) WebCat2b13MacPlugIn - [shownext method=post] ??? (1997) multi-paragraph fields (1997) WebCatalog seems to choke on large (2meg) html files. (1998) WebCat b13 CGI -shownext- (1997)