On Friday, February 14, 2014 7:16:16 AM UTC-8, Rhys Campbell wrote:
>
> Thanks, need it outside pythong thouhg. This seems to work...
>
> DATETIME(SUBSTR(r.time, 1, 10), 'unixepoch', 'localtime') AS dt, 
>

The timestamp is microseconds since the epoch. It looks like you are 
truncating the least significant digits to get a timestamp in seconds. That 
might work, or it might only work for some cases, I'm not sure. The correct 
way to do the conversion, I believe, is to divide r.time by 1e6.

http://trac.edgewall.org/browser/trunk/trac/util/datefmt.py?rev=12372&marks=106-116#L105

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to