Re: Implicit conversion of mysql TIMESTAMP type to Horde_Date

Sebastian Birnbach <[email protected]> Mon, 7 Jan 2019 23:16:32 +0100
Newsgroups gmane.comp.horde.devel
Message-ID <CACTNBFOBJ0VQuKRStMwpcdBXdK_dngjryUX7qjZ5WsuKA96Jwg@mail.gmail.com>
Yes, Mapper is acting up on timestamps with Rdo. I did a local fix, it has
been working for me ever since:
https://bugs.horde.org/ticket/14803

  Sebastian

Am Mo., 7. Jan. 2019 um 18:03 Uhr schrieb Ralf Lang <[email protected]>:

>
> Am 07.01.19 um 16:25 schrieb Ralf Lang:
> > Hi,
> >
> > I am currently a little puzzled by either Horde_Db or Horde_Rdo
> > implicitly converting TIMESTAMP db fields to Horde_Date values.
> > Unfortunately, it has the wrong idea about the timezone of TIMESTAMP.
> >
> > A timestamp stored as 2018-05-16 04:00:00 is returned as 2018-05-16
> > 04:00:00 Europe/Berlin.
> >
> > The database time_zone is SYSTEM. The system timezone is UTC.
> >
> > To understand the issue better, I'd rather turn off the automatic
> > conversion and do the conversion to Horde_Date manually. Is there any
> > config for Horde_Db to govern this?
>
>
> Looks like it's this line:
>
> https://github.com/horde/Rdo/blob/5d16dda64ed249400b18ba4f62fcbcd3443d9d83/lib/Horde/Rdo/Mapper.php#L230
>
> For a hotfix in my local issue, I may overload mapFields (60 loc) in the
> derived Mapper. Still, I think assuming the backend data is always in
> the frontend's default timezone might not always be right.
>
> --
> dev mailing list
> Frequently Asked Questions: http://wiki.horde.org/FAQ
> To unsubscribe, mail: [email protected]
>
-- 
dev mailing list
Frequently Asked Questions: http://wiki.horde.org/FAQ
To unsubscribe, mail: [email protected]