[kronolith] (no subject)
Igor Stroh
stroh@scan-plus.de
14 Jul 2002 13:26:58 +0200
---------------------- multipart/signed attachment
On Sam, 2002-07-13 at 03:15, Ed Coates wrote:
=20
> Any fixes for this in sight?
Try this:
write a script that returns any of the datetime fields in your kronolith
table and see how the returned value is formatted. The right format
should be ISO (YYYY-MM-DD HH:MM:SS). If it's not, the fromDriver()
function in horde/Kronolith/lib/Driver/sql.php fails to return the
correct date. I had just the same problem and solved it by converting
all occurences of "$SQLEvent['event_*']" in sql.php into ISO using a
small custom function[1]. The function works only for LT_TIME =3D=3D de_DE
though, so if you have a different locale set, you'd have to write
you're own one.
This problem arised as I updated my postgreSQL to the newest version. I
don't remember the former version anymore, but the current one is
7.1.3-7.
HTH,
Igor
[1]
function de2iso($s){
$fields =3D explode(' ', $s);
$date =3D explode('.', $fields[0]);
$rdate =3D $date[2].'-'.$date[1].'-'.$date[0];
$rtime =3D substr($fields[1], 0, -3);
return $rdate.' '.$rtime;
}
so e.g. $SQLEvent['event_start'] in sqp.php:fromDriver() would be
de2iso($SQLEvent['event_start']).
--=20
ScanPlus GmbH NOC Ulm - Germany - Griesbadgasse 7-13 - D 89073 Ulm
TEL +49 731 920 13 100 - FAX +49 731 920 13 290
eMail: support@scan-plus.de
Amtsgericht Ulm - HRB3220 - Geschaeftsfuehrer: Juergen Hoermann
---------------------- multipart/signed attachment
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: This is a digitally signed message part
Url : http://lists.horde.org/archives/kronolith/attachments/de8042a2/attachment.bin
---------------------- multipart/signed attachment--