Re: [WebDNA] unix timestamp in WebDNA
This WebDNA talk-list message is from 2009
It keeps the original formatting.
numero = 102074
interpreted = N
texte = Dana Keil wrote:> I thought that a unix timestamp was an available format in WebDNA, but > looking at the docs it seems it is not.> > So I went to the list archives and a search yields some very promising > items relating to posts made by Palle Bo Nielsen about unix timestamp > using WebDNA, but it looks like the actual text of these messages in the > archive has been lost!> > So two things:> 1. is it possible to fix the archive? (I don't know if the missing data > is more widespread or just happens in the messages I was searching for.)> 2. does someone perhaps have an already written function they can give > me that will output a unix timestamp for a WebDNA date?Hey Dana,Unix timestamp (epoch) is far in the future from WebDNA's epoch.. so,it may not be too difficult to build a function called unixtimestamp..something like:------START[function name=unixtimestamp] [text]ustamp=[!] [/!][getchars start=8][!] [/!][shell]/bin/date +FORMAT=%s[/shell][!] [/!][/getchars][/text] [return][ustamp][/return][/function][unixtimestamp]-------ENDHowever, it may be easier to user WebDNA's epoch.. butthat depends on what you are wanting the timestamp for.Donovan-- Donovan D. Brooke PH: 1 (608) 770-3822------------------------------------------------VPWebDNA Software Corporation16192 Coastal HighwayLewes, DE 19958
Associated Messages, from the most recent to the oldest:
Dana Keil wrote:> I thought that a unix timestamp was an available format in WebDNA, but > looking at the docs it seems it is not.> > So I went to the list archives and a search yields some very promising > items relating to posts made by Palle Bo Nielsen about unix timestamp > using WebDNA, but it looks like the actual text of these messages in the > archive has been lost!> > So two things:> 1. is it possible to fix the archive? (I don't know if the missing data > is more widespread or just happens in the messages I was searching for.)> 2. does someone perhaps have an already written function they can give > me that will output a unix timestamp for a WebDNA date?Hey Dana,Unix timestamp (epoch) is far in the future from WebDNA's epoch.. so,it may not be too difficult to build a function called unixtimestamp..something like:------START[function name=unixtimestamp]
[text]ustamp=
[!] [/!][getchars start=8]
[!] [/!]
[shell]/bin/date +FORMAT=%s[/shell]
[!] [/!][/getchars][/text]
[return][ustamp][/return][/function][unixtimestamp]-------ENDHowever, it may be easier to user WebDNA's epoch.. butthat depends on what you are wanting the timestamp for.Donovan-- Donovan D. Brooke PH: 1 (608) 770-3822------------------------------------------------VPWebDNA Software Corporation16192 Coastal HighwayLewes, DE 19958
Donovan Brooke
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:
Multiple catalog databases and showcart (1997)
fieldType=num (1997)
WebCat2 - Getting to the browser's username/password data (1997)
Caching [include] files ... (1997)
WC2b15 File Corruption (1997)
Nested vs conditional (1997)
Multiple Newcarts (1996)
Username for Admin Group (1997)
Need help with emailer- 2 issues (1997)
Changing cart expiry (1998)
Extended [ConvertChars] (1997)
Problems with [Applescript] (1997)
Re:Off Topic (Help!!!! w/Webstar) (1999)
Bug Report, maybe (1997)
WebCat2b15MacPlugIn - [authenticate] not [protect] (1997)
WebCommerce: Folder organization ? (1997)
Major problem (1999)
Generating unique SKU from [cart] (1997)
Quitting WebMerchant ? (1997)
WebCat hosting sites? (1998)