[Freeswitch-users] Javascript Database Timestamp and Date()

David Swardstrom dswardstrom at remotelink.com
Tue Jun 15 14:37:43 PDT 2010


I am working with Javascript and Freeswitch to emulate some Conferencing 
capability that the company I am working for has in production using 
other products.

One thing that I need to do is to access a timestamp from a database in JS.
In pgAdmin for Postgres this is a "timestamp without time zone".

In JS there is a data type called Date.

Question: If I read a row of the database which includes this timestamp
field, what should I put it into?
* Can I put it directly into a Date data type?
* Does it have to come out as a string or a number?
* If it is a number can I then put it into a Date?
* If it is a string, what is the format:
  Is it: "YYYY-MM-DD HH:MM:SS.ffffff"?

I looked in mod_spidermonkey_odbc.c pdbc_next_row() and it appears to
call SQLFetch() and return the result. 
But information on a row contains both a value but it's type,
so what will the interpreter do?

If anyone knows, let me know, otherwise I will incorporate a way 
to test this into my code and let everyone know (may also add this
to some Wiki).

Regards,
David Swardstrom
(profile)http://wiki.freeswitch.org/wiki/User:Dswardstrom



More information about the FreeSWITCH-users mailing list