[evolvis-commits] r13122: Fixed date printing and parsing in activity tab, where the expected =?UTF-8?Q?=E2=86=B5=20format=20for=20date=20i?==?UTF-8?Q?nput=20didn?=' t match the one used for display ( =?UTF-8?Q?which=E2=86=B5=20depended=20on=20?==?UTF-8?Q?locale?=). ↵
mirabilos at evolvis.org
mirabilos at evolvis.org
Mon Feb 28 02:18:26 CET 2011
Author: mirabilos
Date: 2011-02-28 02:18:26 +0100 (Mon, 28 Feb 2011)
New Revision: 13122
Modified:
trunk/gforge_base/evolvisforge-5.1/gforge/debian/changelog
trunk/gforge_base/evolvisforge-5.1/gforge/www/activity/index.php
Log:
Fixed date printing and parsing in activity tab, where the expected
format for date input didn't match the one used for display (which
depended on locale).
Modified: trunk/gforge_base/evolvisforge-5.1/gforge/debian/changelog
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/debian/changelog 2011-02-28 01:18:24 UTC (rev 13121)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/debian/changelog 2011-02-28 01:18:26 UTC (rev 13122)
@@ -11,7 +11,7 @@
-- Roland Mas <lolando at debian.org> Thu, 26 Mar 2009 17:29:27 +0100
-gforge (4.7.2-3+3) experimental; urgency=low
+gforge (4.7.2-3+4) experimental; urgency=low
* Quick fix for a bug in uploading attachments to forum posts. A proper
fix requires a change in the DB schema, and will be implemented in
@@ -19,8 +19,11 @@
* Removed database password from a world-readable file.
* Fixed require directives in cronjobs (again, this is only for the 4.7
series as it won't be needed on trunk).
+ * Fixed date printing and parsing in activity tab, where the expected
+ format for date input didn't match the one used for display (which
+ depended on locale).
- -- Roland Mas <lolando at debian.org> Thu, 02 Apr 2009 15:01:23 +0200
+ -- Roland Mas <lolando at debian.org> Thu, 02 Apr 2009 15:14:05 +0200
gforge (4.7.2-3) experimental; urgency=low
Modified: trunk/gforge_base/evolvisforge-5.1/gforge/www/activity/index.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/www/activity/index.php 2011-02-28 01:18:24 UTC (rev 13121)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/www/activity/index.php 2011-02-28 01:18:26 UTC (rev 13122)
@@ -20,15 +20,17 @@
$end = getStringFromRequest("end_date");
$show=getArrayFromRequest("show");
+$date_format = _('%Y-%m-%d') ;
+
if (!$begin || $begin==0) {
$begin = (time()-(30*86400));
} else {
- $begin = strtotime($begin);
+ $begin = strptime ($begin, $date_format);
}
if (!$end || $end==0) {
- $end = time();
+ $end = time ();
} else {
- $end=strtotime($end)+86400;
+ $end = strptime ($end, $date_format) + 86400;
}
if ($begin > $end) {
$endtmp=$end;
@@ -109,8 +111,8 @@
</tr>
<tr>
<td><?php echo $multiselect; ?></td>
- <td valign="top"><input name="start_date" value="<?php echo date(_('Y-m-d'),$begin); ?>" size="10" maxlength="10" /></td>
- <td valign="top"><input name="end_date" value="<?php echo date(_('Y-m-d'),$end); ?>" size="10" maxlength="10" /></td>
+ <td valign="top"><input name="start_date" value="<?php echo strftime($date_format,$begin); ?>" size="10" maxlength="10" /></td>
+ <td valign="top"><input name="end_date" value="<?php echo strftime($date_format,$end); ?>" size="10" maxlength="10" /></td>
<td valign="top"><input type="submit" name="submit" value="<?php echo _('Submit'); ?>"/></td>
</tr>
</table>
@@ -128,11 +130,11 @@
$j=0;
$last_day = 0;
while ($arr =& db_fetch_array($res)) {
- if ($last_day != date('Y-M-d',$arr['activity_date'])) {
+ if ($last_day != strftime($date_format,$arr['activity_date'])) {
// echo $HTML->listTableBottom($theader);
- echo '<tr class="tableheading"><td colspan="3">'.date(_('Y-m-d'),$arr['activity_date']).'</td></tr>';
+ echo '<tr class="tableheading"><td colspan="3">'.strftime($date_format,$arr['activity_date']).'</td></tr>';
// echo $HTML->listTableTop($theader);
- $last_day=date('Y-M-d',$arr['activity_date']);
+ $last_day=strftime($date_format,$arr['activity_date']);
}
switch ($arr['section']) {
case 'commit': {
More information about the evolvis-commits
mailing list