Summary | monthdayyear field for birthday before 1970-01-01 |
Queue | Turba |
Queue Version | 2.1 |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | Horde Developers (at) |
Requester | horde (at) public (dot) linkpool (dot) de |
Created | 04/06/2006 (7030 days ago) |
Due | |
Updated | 06/14/2007 (6596 days ago) |
Assigned | 11/05/2006 (6817 days ago) |
Resolved | 06/14/2007 (6596 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | 2.2 |
Patch | No |
State ⇒ Resolved
State ⇒
it at least in Horde_Date internally in any other framework packages
which would help the original issue of this ticket.
we have Horde_Date in Horde 3.0.0?
We'd have to update all of the code for dealing with timestamps to use
a hack like adodb's functions.
these dates before Horde 4.
test dates after 2038, but dates around 1925 work fine.
Priority ⇒ 1. Low
workarounds. Any other opinions here?
Nearly the same configuration and the same bug.
The "adodb_date_time_library" solultion works for both machines.
http://www.php.net/mktime#38068
for some dates.
The "adodb_date_time_library" seems to be a better solution for
working with dates befor 1.1.1970:
http://www.xaraya.com/documentation/phpxref/xaradodb/adodb-time.inc.php.source.txt
Still testing ... Ralph
Priority ⇒ 3. High
It's inside
horde/lib/Horde/date.php
The
function timestamp()
{
return MakeTime($this->hour, $this->min, $this->sec,
$this->month, $this->mday, $this->year);
}
Returns a wrong value for dates before 1970-01-01
System
Debian Sarge 3.1 with PHP Version 4.3.10-16
Resolution could be:
http://www.php.net/mktime#38068
For me, this works.
Ralph
Assigned to
State ⇒ Assigned
an issue with the ldap driver:
$attributes['birthday'] = array(
'label' => _("Birthday"),
'type' => 'monthdayyear',
'params' => array(1900, null, true, '%Y-%m-%d'),
'required' => false,
);
Priority ⇒ 2. Medium
State ⇒ Unconfirmed
Queue ⇒ Turba
Type ⇒ Bug
Summary ⇒ monthdayyear field for birthday before 1970-01-01
field can't save dates before 1970-01-01.
This worked before...
I included mozillaAbObsoletePerson as schema for my OpenLDAP server and
added in config/sources.php
'birthday' => 'mozillaCustom2'
The LDAP browser shows for a date after 1970-01-01
# slapcat | grep custom2
1978-05-26
=> mozillaCustom2: 1978-05-26 00:00:00
That's fine.
But a date before 1970-01-01 doesn't work:
1938-05-26
=> mozillaCustom2: 1969-12-31 00:00:00
Any idea?
I've tried:
$attributes['birthday'] = array(
'label' => _("Birthday"),
'type' => 'monthdayyear',
'required' => false,
'params' => array(1900),
'required' => false
);
and
$attributes['birthday'] = array(
'label' => _("Birthday"),
'type' => 'monthdayyear',
'required' => false,
'params' => array(1900, null, true, '%Y-%m-%d'),
'required' => false
);
and
$attributes['birthday'] = array(
'label' => _("Birthday"),
'type' => 'monthdayyear',
'required' => false,
'params' => array(1900, null, true, '%Y-%m-%d 00:00:00'),
'required' => false
);
The result is allways the same