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;
}