Feature #928
postdates show up as "posted on invalid date"
| Status : | Closed | Start : | ||
| Priority : | Normal | Due date : | ||
| Assigned to : | neuro - | % Done : | 0% |
|
| Category : | frontend | |||
| Target version : | 5.0 | |||
| Resolution : | fixed |
Description
Post dates are shown as "posted on invalid date"
Running ff1.04 on winxp using a DANISH locale:
<script type="text/javascript">document.write(get_local_time_for_date("Wed, 27 Jul 2005 11:21:22 Rom, normaltid"));</script>
normaltid is danish for GMT I presume
In mysql the date is "2005-07-27 13:21:22"
History
07/27/2005 11:27 AM - mikkel-helenius-dk -
Update: When using IE is shows up as "Posted by Mikkel on NaN"
07/31/2005 10:54 PM - scott -
I think this is a localization issue. I post-dated an article and everything worked just fine for me with Safari and FF--the date displayed as '8 hours from now', which seems correct. Once we implement #222, then this article shouldn't show up at all, but that's a post-2.5 feature.
Here's the raw HTML from the page:
<script type="text/javascript">document.write(get_local_time_for_date("Mon, 01 Aug 2005 07:00:00 GMT"));</script><noscript>on Mon, 01 Aug 2005 07:00:00 GMT</noscript>
So, I think what we're seeing is a locale issue--your locale calls UTC something other then UTC or GMT. Setting 'LANG=C' would probably fix this, but there's an easier way. For now, I'm going to make a minor change and remove the TZ name from the string that Rails generates--it's always going to be in UTC anyway, so I'm just going to say "GMT".
07/31/2005 10:55 PM - scott -
- Status changed from New to Closed
- Resolution set to fixed
(In r475) Took timezone out of JS "days ago" string. Since we always send it in GMT/UTC, asking the system for the TZ name is redundant and apparently causes locale problems. (closes #235)
07/31/2006 11:15 PM - lnxbil-saarlinux-org -
Only a comment:
You have to be sure, that the current locale, the server is running with, is set to C. I had the same problem above which locale set to something other than C and only some entries are displayed right. Exactly the entries, which first two digests were the same.
04/06/2007 08:06 PM - neuro -
- Status changed from Closed to Feedback
- Resolution deleted (
fixed)
The javascript that displays the date is not localized
