Anonymous | Login | Signup for a new account | 12-17-2024 08:32 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0002163 | [Quercus] | major | always | 11-10-07 21:03 | 11-14-07 21:07 | ||||
Reporter | catkins | View Status | public | ||||||
Assigned To | nam | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | 3.0.23 | ||||||
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. | ||||||||
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; } |
||||||||
Attached Files | |||||||||
|
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed. 26 unique queries executed. |