Re: feature request-- [epoch]

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 55520
interpreted = N
texte = Donovan Brooke wrote: > John Peacock wrote: >> Please believe me when I say that the only epoch worth discussing is >> 1970-01-01T00:00:00. > > > Well, if your on the webdna list you have to discuss WebDNA's epoch at > least! ;-) I find WebDNA's "epoch" to be a complete bodge, since it corresponds to nothing useful in reality. The current calendar has no meaning whatsoever before 1582 (the official adoption of the Gregorian calendar by [at least some] Catholic countries). For example, the change from the Julian to the Gregorian calendar occurred at different times over the course of nearly 400 years, often depending on what country (and even city) you were in. China didn't officially adopt the Gregorian calendar until the revolution in 1949! > This is the trick isn't it. Are you saying it would be too difficult > to add this feature because of timezones? How about leapyears > and daylight savings time etc? No, I'm saying it is impossible to do right [see above]. It is difficult to do even if you limit yourself to the Unix epoch; I've been involved marginally in the Perl DateTime project: http://datetime.perl.org/ where it has been hashed out. The only way to even marginally deal with leap time and DST is to use the Olsen database, which is a collection of rules covering various ranges. For example, California went to DST at different times in the past than it doesn now. Internally, I suspect that the WebDNA code converts the date number to a number of seconds since the Unix epoch and then uses the system library function to convert that to actual date (mm/dd/yyyy), rather than encode all the rules. > > *If* that is the case, it would be at least nice to be able to select > between a couple or few of the most popular ones (at the very least being > able to access the "UTC" epoch. [math]{[date]}[/math]-[math]{01/01/1970}[/math] will give you number of days since the Unix/UTC epoch, which can be multiplied by 86400 seconds per day to get seconds since the epoch for a given date. > It just depends. Lets say, for that example that I posted that I want > to parse out the secondssinceepoch field via XML from sourcefourge. How > would I do that since their epoch is different than WebDNA's? The above formula should give you hints on how to do that. John -- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4501 Forbes Boulevard Suite H Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5748 ------------------------------------------------------------- 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: feature request-- [epoch] ( John Peacock 2004)
  2. Re: feature request-- [epoch] ( Donovan Brooke 2004)
  3. Re: feature request-- [epoch] ( Donovan Brooke 2004)
  4. Re: feature request-- [epoch] ( "Dan Strong" 2004)
  5. Re: feature request-- [epoch] ( John Peacock 2004)
  6. Re: feature request-- [epoch] ( "Dan Strong" 2004)
  7. Re: feature request-- [epoch] ( "Nitai @ ComputerOil" 2004)
  8. Re: feature request-- [epoch] ( John Peacock 2004)
  9. Re: feature request-- [epoch] ( Donovan Brooke 2004)
  10. Re: feature request-- [epoch] ( "Nitai @ ComputerOil" 2004)
  11. Re: feature request-- [epoch] ( Donovan Brooke 2004)
  12. feature request-- [epoch] ( Donovan Brooke 2004)
Donovan Brooke wrote: > John Peacock wrote: >> Please believe me when I say that the only epoch worth discussing is >> 1970-01-01T00:00:00. > > > Well, if your on the webdna list you have to discuss WebDNA's epoch at > least! ;-) I find WebDNA's "epoch" to be a complete bodge, since it corresponds to nothing useful in reality. The current calendar has no meaning whatsoever before 1582 (the official adoption of the Gregorian calendar by [at least some] Catholic countries). For example, the change from the Julian to the Gregorian calendar occurred at different times over the course of nearly 400 years, often depending on what country (and even city) you were in. China didn't officially adopt the Gregorian calendar until the revolution in 1949! > This is the trick isn't it. Are you saying it would be too difficult > to add this feature because of timezones? How about leapyears > and daylight savings time etc? No, I'm saying it is impossible to do right [see above]. It is difficult to do even if you limit yourself to the Unix epoch; I've been involved marginally in the Perl DateTime project: http://datetime.perl.org/ where it has been hashed out. The only way to even marginally deal with leap time and DST is to use the Olsen database, which is a collection of rules covering various ranges. For example, California went to DST at different times in the past than it doesn now. Internally, I suspect that the WebDNA code converts the date number to a number of seconds since the Unix epoch and then uses the system library function to convert that to actual date (mm/dd/yyyy), rather than encode all the rules. > > *If* that is the case, it would be at least nice to be able to select > between a couple or few of the most popular ones (at the very least being > able to access the "UTC" epoch. [math]{[date]}[/math]-[math]{01/01/1970}[/math] will give you number of days since the Unix/UTC epoch, which can be multiplied by 86400 seconds per day to get seconds since the epoch for a given date. > It just depends. Lets say, for that example that I posted that I want > to parse out the secondssinceepoch field via XML from sourcefourge. How > would I do that since their epoch is different than WebDNA's? The above formula should give you hints on how to do that. John -- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4501 Forbes Boulevard Suite H Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5748 ------------------------------------------------------------- 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/ 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:

Referring URL (1998) [subtotal] and others (1997) OT: Microsoft to buy Macromedia? was: [Ignore] Test (2002) [OT] RSS Feeds (2007) Nested Lookups (1998) converted seed value? (1998) DomainList (2005) need some help with a loop (1999) [WebDNA] WebDNA + Elasticsearch (2015) Online Docs? (1997) Authenticate (1997) WebCat2b13MacPlugIn - More limits on [include] (1997) [WebDNA] SMTP sendmail error (2015) OSX Jaguar (2002) Re:2nd WebCatalog2 Feature Request (1996) [WebDNA] [BULK] which of these tags exist in 7.0 (2011) WebCat2 - many [carts] on one template page? (1997) WebCat2b15MacPlugin - showing [math] (1997) Help!!!! (1997) Speed Optimization - Mac (1997)