Closed
Bug 938161
Opened 11 years ago
Closed 11 years ago
sql_date_format() method for SQLite has an incorrect default format
Categories
(Bugzilla :: Database, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 4.2
People
(Reporter: LpSolit, Assigned: LpSolit)
References
Details
Attachments
(1 file)
620 bytes,
patch
|
glob
:
review+
|
Details | Diff | Splinter Review |
editusers.cgi calls $dbh->sql_date_format('profiles_activity.profiles_when') to display changes of a user account (see action eq "activity"). When no format is passed to this method, it falls back to "%Y.%m.%d %H:%M:%s", but on SQLite, %s means "seconds since 1970-01-01", see http://www.sqlite.org/lang_datefunc.html. What we want is %S.
This means that "2013.11.13 13:53:25" is displayed as "2013.11.13 13:53:1384350805".
This could potentially cause more trouble, e.g. when passed to DateTime as the string would be unparsable or return a date object with wrong data in it.
![]() |
Assignee | |
Comment 1•11 years ago
|
||
![]() |
Assignee | |
Comment 2•11 years ago
|
||
Note that SQLite support has been added in Bugzilla 4.2, see bug 337776.
Comment on attachment 831535 [details] [diff] [review]
patch, v1
r=glob
Attachment #831535 -
Flags: review?(glob) → review+
![]() |
Assignee | |
Comment 4•11 years ago
|
||
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/trunk/
modified Bugzilla/DB/Sqlite.pm
Committed revision 8811.
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/4.4/
modified Bugzilla/DB/Sqlite.pm
Committed revision 8637.
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/4.2/
modified Bugzilla/DB/Sqlite.pm
Committed revision 8238.
![]() |
Assignee | |
Comment 5•11 years ago
|
||
Added to relnotes for 4.4.2.
You need to log in
before you can comment on or make changes to this bug.
Description
•