| | 84 | // Adjust year for limits of MySQL's DATETIME type |
|---|
| | 85 | // (http://dev.mysql.com/doc/refman/4.1/en/datetime.html) |
|---|
| | 86 | $aa = ($aa < 1000) ? 1000 : $aa; |
|---|
| | 87 | $aa = ($aa > 9999) ? 9999 : $aa; |
|---|
| | 88 | // Further adjustments, to make sure that adjustments |
|---|
| | 89 | // with time offset don't push date's outside of MySQL's |
|---|
| | 90 | // DATETIME type. |
|---|
| | 91 | if ($aa == 1000 && $jj == 1 && $mm ==1 && $hh < 12) { |
|---|
| | 92 | $hh = 12; |
|---|
| | 93 | $mn = 00; |
|---|
| | 94 | $ss = 00; |
|---|
| | 95 | } |
|---|
| | 96 | if ($aa == 9999 && $jj == 31 && $mm ==12 && $hh >= 12) { |
|---|
| | 97 | $hh = 12; |
|---|
| | 98 | $mn = 00; |
|---|
| | 99 | $ss = 00; |
|---|
| | 100 | } |
|---|
| | 308 | // Adjust year for limits of MySQL's DATETIME type |
|---|
| | 309 | // (http://dev.mysql.com/doc/refman/4.1/en/datetime.html) |
|---|
| | 310 | $aa = ($aa < 1000) ? 1000 : $aa; |
|---|
| | 311 | $aa = ($aa > 9999) ? 9999 : $aa; |
|---|
| | 312 | // Further adjustments, to make sure that adjustments |
|---|
| | 313 | // with time offset don't push date's outside of MySQL's |
|---|
| | 314 | // DATETIME type. |
|---|
| | 315 | if ($aa == 1000 && $jj == 1 && $mm ==1 && $hh < 12) { |
|---|
| | 316 | $hh = 12; |
|---|
| | 317 | $mn = 00; |
|---|
| | 318 | $ss = 00; |
|---|
| | 319 | } |
|---|
| | 320 | if ($aa == 9999 && $jj == 31 && $mm ==12 && $hh >= 12) { |
|---|
| | 321 | $hh = 12; |
|---|
| | 322 | $mn = 00; |
|---|
| | 323 | $ss = 00; |
|---|
| | 324 | } |
|---|