[pLog-svn] r3509 - in plog/trunk/class: dao data

Oscar Renalias oscar at renalias.net
Fri Jun 2 11:35:57 GMT 2006


Oh that's lovely.

I know we shouldn't have written code like
substr(mysql_date_field,4,6) to obtain the month number, but changing
the format of a column from one type to another within a minor release
(4.0 to 4.1, not even 4.x to 5.x) seems a big change for me...

At least by using our Timestamp class we're shielded from this, too
bad we didn't use it everywhere.

On 6/2/06, Christoph Feddersen <feddersen at herr-der-ringe-film.de> wrote:
> Maybe that's the explanation?
> http://dev.mysql.com/doc/refman/4.1/en/timestamp-4-1.html
>
> Jon Daley wrote:
> >     I forget what it looked like, it was just different from my server.
> > I went back through the emails, and the only thing I have written down
> > is that I had to not just "SELECT date", but "SELECT
> > UNIX_TIMESTAMP(date)", and then later I used "date('blah',
> > strtotime(date)" to format it correctly for displaying.
> >
> > The task was to get LT data on a non-LT page.
> >
> > On Fri, 2 Jun 2006, Oscar Renalias wrote:
> >> Is that so?
> >>
> >> I only noticed two formats for TIMESTAMP(14): YYYYMMDDHHMMSS and
> >> YYYY-MM-DD HH:MM:SS. Which format did you come across when helping
> >> this German guy?
> >>
> >> On 6/2/06, Jon Daley <plogworld at jon.limedaley.com> wrote:
> >>> On Fri, 2 Jun 2006, oscar at devel.lifetype.net wrote:
> >>> > Also, does anybody know why in some databases TIMESTAMP(14)
> >>> defaults to
> >>> > one format and sometimes to another?
> >>>
> >>>         Different locales, right?  I was working on a German guy's
> >>> database, and his timestamps were different, so my original code
> >>> worked on
> >>> my blog, but not his.
> > _______________________________________________
> > pLog-svn mailing list
> > pLog-svn at devel.lifetype.net
> > http://devel.lifetype.net/mailman/listinfo/plog-svn
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://devel.lifetype.net/mailman/listinfo/plog-svn
>


More information about the pLog-svn mailing list