Edgewall Software

Ticket #6094 (closed defect: worksforme)

Opened 14 months ago

Last modified 10 months ago

current_date function doesnt work

Reported by: deepak.arora@… Owned by: jonas
Priority: normal Milestone:
Component: general Version:
Severity: normal Keywords:
Cc:

Description (last modified by eblot) (diff)

when I try to execute 'select current_date', a standard postgresql command to get the current date, it throws an internal error:

Python Traceback
Traceback (most recent call last):
  File "C:\Python24\Lib\site-packages\trac\web\main.py", line 406, in dispatch_request
    dispatcher.dispatch(req)
  File "C:\Python24\Lib\site-packages\trac\web\main.py", line 237, in dispatch
    resp = chosen_handler.process_request(req)
  File "C:\Python24\Lib\site-packages\trac\ticket\report.py", line 88, in process_request
    resp = self._render_view(req, db, id)
  File "C:\Python24\Lib\site-packages\trac\ticket\report.py", line 346, in _render_view
    value['date'] = format_date(cell)
  File "C:\Python24\Lib\site-packages\trac\util\datefmt.py", line 68, in format_date
    return format_datetime(t, format, gmt)
  File "C:\Python24\Lib\site-packages\trac\util\datefmt.py", line 58, in format_datetime
    t = time.localtime(float(t))

Let me know if I am missing anything.

Attachments

Change History

  Changed 14 months ago by eblot

  • description modified (diff)

in reply to: ↑ description   Changed 14 months ago by eblot

Replying to deepak.arora@supportsoft.com:

Let me know if I am missing anything.

At least the last (but most important) line of the traceback that shows the error type, and the version of Trac you're using.

  Changed 12 months ago by sid

  • keywords needinfo added

Please provide the last line of the traceback so we can help debug this issue. Also, which version of Trac are you using?

  Changed 10 months ago by osimons

  • keywords needinfo removed
  • status changed from new to closed
  • resolution set to worksforme

Your traceback is cut before the final line where it actually says what the error is. I do expect this to be essentially the same issue as #6610 (only different use and platform). Try to find the appropriate Postgres function to return the int or float that Trac can use - it does look like it fails trying to convert the value from your select.

I'm closing as 'worksforme', and please reopen if you think this is an error in Trac itself. Oh, and if so the full error + details on your setup + Trac version is very much needed.

Add/Change #6094 (current_date function doesnt work)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from jonas. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.