Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004626 [Quercus] minor always 06-19-11 19:55 06-02-16 12:12
Reporter rickHigh View Status public  
Assigned To
Priority normal Resolution open Platform
Status new   OS
Projection none   OS Version
ETA none Fixed in Version Product Version
  Product Build
Summary 0004626: strftime does not work with %R
Description
$startTime = mktime(23, 0, 0, 5, 29, 2011);
$str = strftime ("%R", $startTime);

According to:
http://php.net/manual/en/function.strftime.php [^]

It should work as follows:

%R Same as "%H:%M" Example: 00:35 for 12:35 AM, 16:44 for 4:44 PM

Steps To Reproduce
Additional Information
Attached Files

- Relationships

- Notes
(0005328)
rickHigh
06-19-11 19:56

The workaround is as follows:


$startTime = mktime(23, 0, 0, 5, 29, 2011);
$str = strftime ("%H:%M", $startTime);
 
(0006702)
matthiasblaesing
06-02-16 12:12

Implementation:

# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- a/modules/kernel/src/com/caucho/util/QDate.java
+++ b/modules/kernel/src/com/caucho/util/QDate.java
@@ -1205,6 +1205,17 @@
           break;
         }
 
+ case 'R':
+ {
+ int hour = (int) (_timeOfDay / 3600000) % 24;
+ cb.append(hour / 10);
+ cb.append(hour % 10);
+ cb.append(':');
+ cb.append((_timeOfDay / 600000) % 6);
+ cb.append((_timeOfDay / 60000) % 10);
+ break;
+ }
+
       case 'W':
         int week = getWeek();
         cb.append((week + 1) / 10);
 

- Issue History
Date Modified Username Field Change
06-19-11 19:55 rickHigh New Issue
06-19-11 19:56 rickHigh Note Added: 0005328
06-20-11 02:55 kdecherf Issue Monitored: kdecherf
06-02-16 12:12 matthiasblaesing Note Added: 0006702


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
33 total queries executed.
28 unique queries executed.
Powered by Mantis Bugtracker