Incorrect date format in new comment HTML
Bug #510539 reported by
Emilis Dambauskas
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Policy Feed |
Confirmed
|
Low
|
Emilis Dambauskas |
Bug Description
Steps:
- Go to document page.
- Submit a new comment.
Result:
A new comment appears with wrong date format (e.g. "2010-0-21 10:24").
To post a comment you must log in.
The reason for this is that The getMonth() method returns the month (from 0 to 11) www.w3schools. com/jsref/ jsref_getmonth. asp
See docs for details: http://
The issue is in file static/ files/PolicyFee d/Comments. js:182
When the page is reloaded, the date is taken from Comments table Update field. That field, AFAIK, is populated automatically by default by MYSQL, since it has setting default value to CURRENT_TIMESTAMP. So in this case everything works as expected