Skip Menu |

This queue is for tickets about the DBIx-Class-Journal CPAN distribution.

Report information
The Basics
Id: 59643
Status: resolved
Worked: 10 min
Priority: 0/
Queue: DBIx-Class-Journal

People
Owner: Nobody in particular
Requestors: tfrayner [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.900001_02
Fixed in: (no value)



Subject: date handling in changeset
Hi, Firstly, let me thank the authors and maintainers for producing a module which does almost exactly what I need with the minimum of fuss. I'm sorry to report that the current handling of dates in the ChangeSet class will not work with MySQL 5.0, especially not when run in a strict date format mode. I appreciate that the proposed patch below is almost certainly too simplistic, particularly in light of the code comment suggesting that there may be back compatability issues. I hope that if nothing else this report provides some encouragement to address the issue! Thank you again for an extremely useful module. Best regards, Tim Rayner Version info: Distribution: DBIx-Class-Journal-0.900102 Perl version: 5.10.1 OS: Mac OS X 10.5.8 Mysql version: 5.0.83 Proposed patch: --- /usr/local/lib/perl5/site_perl/5.10.1/DBIx/Class/Schema/Journal/DB/ChangeSet.pm 2010-07-23 10:53:36.000000000 +0100 +++ lib/DBIx/Class/Schema/Journal/DB/ChangeSet.pm 2010-07-23 10:53:19.000000000 +0100 @@ -2,6 +2,8 @@ use base 'DBIx::Class::Core'; +use DBIx::Class::TimeStamp; + sub journal_define_table { my ( $class, $schema_class, $prefix ) = @_; @@ -42,7 +44,7 @@ # import?) to do it and retain backcompat I will. # # --fREW, 01-27-2010 - $self->set_date(scalar gmtime); + $self->set_date(DBIx::Class::TimeStamp->get_timestamp); return $self; }
Subject: Re: [rt.cpan.org #59643] date handling in changeset
Date: Fri, 23 Jul 2010 09:00:26 -0500
To: bug-DBIx-Class-Journal [...] rt.cpan.org
From: fREW Schmidt <frioux [...] gmail.com>
Oh! I'm sorry, this is a known issue. I just forgot to fix it. Expect a new version by Wednesday. On Jul 23, 2010 5:05 AM, "http://www.flickr.com/photos/tfrayner via RT" < bug-DBIx-Class-Journal@rt.cpan.org> wrote: Fri Jul 23 06:05:22 2010: Request 59643 was acted upon. Transaction: Ticket created by http://www.flickr.com/photos/tfrayner Queue: DBIx-Class-Journal Subject: date handling in changeset Broken in: 0.900001_02 Severity: (no value) Owner: Nobody Requestors: tfrayner@gmail.com Status: new Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=59643 > Hi, Firstly, let me thank the authors and maintainers for producing a module which does almost exactly what I need with the minimum of fuss. I'm sorry to report that the current handling of dates in the ChangeSet class will not work with MySQL 5.0, especially not when run in a strict date format mode. I appreciate that the proposed patch below is almost certainly too simplistic, particularly in light of the code comment suggesting that there may be back compatability issues. I hope that if nothing else this report provides some encouragement to address the issue! Thank you again for an extremely useful module. Best regards, Tim Rayner Version info: Distribution: DBIx-Class-Journal-0.900102 Perl version: 5.10.1 OS: Mac OS X 10.5.8 Mysql version: 5.0.83 Proposed patch: --- /usr/local/lib/perl5/site_perl/5.10.1/DBIx/Class/Schema/Journal/DB/ChangeSet.pm 2010-07-23 10:53:36.000000000 +0100 +++ lib/DBIx/Class/Schema/Journal/DB/ChangeSet.pm 2010-07-23 10:53:19.000000000 +0100 @@ -2,6 +2,8 @@ use base 'DBIx::Class::Core'; +use DBIx::Class::TimeStamp; + sub journal_define_table { my ( $class, $schema_class, $prefix ) = @_; @@ -42,7 +44,7 @@ # import?) to do it and retain backcompat I will. # # --fREW, 01-27-2010 - $self->set_date(scalar gmtime); + $self->set_date(DBIx::Class::TimeStamp->get_timestamp); return $self; }
Ok, this is fixed in the latest release. I used something close to what your patch was, but more standard usage of ::TimeStamp. Anyway, let me know if there are issues remaining. Hope this helps!