Univention Bugzilla – Attachment 9451 Details for
Bug 46544
OverflowError: mktime argument out of range
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fix_userexpiry_mapping_1970_to_2070.patch
fix_userexpiry_mapping_1970_to_2070.patch (text/plain), 928 bytes, created by
Arvid Requate
on 2018-03-08 12:58:12 CET
(
hide
)
Description:
fix_userexpiry_mapping_1970_to_2070.patch
Filename:
MIME Type:
Creator:
Arvid Requate
Created:
2018-03-08 12:58:12 CET
Size:
928 bytes
patch
obsolete
>diff --git a/management/univention-directory-manager-modules/modules/univention/admin/syntax.py b/management/univention-directory-manager-modules/modules/univention/admin/syntax.py >index af4a251ee7..7eac38592f 100644 >--- a/management/univention-directory-manager-modules/modules/univention/admin/syntax.py >+++ b/management/univention-directory-manager-modules/modules/univention/admin/syntax.py >@@ -1377,6 +1377,9 @@ class date2(date): # fixes the century > if text and self._re_de.match(text): > day, month, year = map(lambda(x): int(x), text.split('.')) > if 0 <= year <= 99 and 1 <= month <= 12 and 1 <= day <= 31: >+ ## Workaround for 2.1.1970: don't wrap to 2070: >+ if year >= 39: # Everything after that has the 2038 problem anyway >+ return '19%02d-%02d-%02d' % (year, month, day) > return '20%02d-%02d-%02d' % (year, month, day) > raise univention.admin.uexceptions.valueError(_("Not a valid Date")) >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 46544
: 9451