Mantis - Quercus
|
|||||
Viewing Issue Advanced Details | |||||
|
|||||
ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
2163 | major | always | 11-10-07 21:03 | 11-14-07 21:07 | |
|
|||||
Reporter: | catkins | Platform: | |||
Assigned To: | nam | OS: | |||
Priority: | normal | OS Version: | |||
Status: | closed | Product Version: | 3.0.23 | ||
Product Build: | Resolution: | fixed | |||
Projection: | none | ||||
ETA: | none | Fixed in Version: | 3.1.4 | ||
|
|||||
Summary: | 0002163: mktime | ||||
Description: | mktime does not conform to behavior required for out-of-range values. See below for new version that passes examples given on php documentation. | ||||
Steps To Reproduce: | |||||
Additional Information: |
/** * Returns the formatted date. */ public long mktime(Env env, @Optional("-1") int hour, @Optional("-1") int minute, @Optional("-1") int second, @Optional("-1") int month, @Optional("-2147483648") int day, @Optional("-1") int year, @Optional("-1") int isDST) { if (isDST != -1) env.deprecatedArgument("isDST"); QDate date = new QDate(true); long now = Alarm.getCurrentTime(); date.setLocalTime(now); if (year >= 0 && year <= 69) year += 2000; else if (year >= 70 && year <= 100) year += 1900; if (year > 0) date.setYear(year); if (month > 0) date.setMonth(month - 1); if (day != -2147483648) date.setDayOfMonth(day); if (hour >= 0) date.setHour(hour); if (minute >= 0) date.setMinute(minute); if (second >= 0) date.setSecond(second); return date.getGMTTime() / 1000L; } |
||||
Relationships | |||||
Attached Files: |
Notes | |||||
|
|||||
|
|