Edgewall Software
Modify

Opened 17 years ago

Closed 16 years ago

#6094 closed defect (worksforme)

current_date function doesnt work

Reported by: deepak.arora@… Owned by: Jonas Borgström
Priority: normal Milestone:
Component: general Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Emmanuel Blot)

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 (0)

Change History (4)

comment:1 by Emmanuel Blot, 17 years ago

Description: modified (diff)

in reply to:  description comment:2 by Emmanuel Blot, 17 years ago

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.

comment:3 by sid, 16 years ago

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?

comment:4 by osimons, 16 years ago

Keywords: needinfo removed
Resolution: worksforme
Status: newclosed

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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.