Opened 17 years ago
Closed 17 years ago
#6094 closed defect (worksforme)
current_date function doesnt work
Reported by: | 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 )
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 , 17 years ago
Description: | modified (diff) |
---|
comment:2 by , 17 years ago
comment:3 by , 17 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 , 17 years ago
Keywords: | needinfo removed |
---|---|
Resolution: | → worksforme |
Status: | new → closed |
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.
Replying to deepak.arora@supportsoft.com:
At least the last (but most important) line of the traceback that shows the error type, and the version of Trac you're using.