Set timezone utc.
This commit is contained in:
parent
75466d7eac
commit
3f4d9aea0d
@ -41,8 +41,19 @@ sub Schema ($class) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Undef is perfectly fine for username and password.
|
# Undef is perfectly fine for username and password.
|
||||||
$schema =
|
$schema = $class->connect(
|
||||||
$class->connect( $dsn, $user, $password, { auto_savepoint => 1 } );
|
$dsn, $user,
|
||||||
|
$password,
|
||||||
|
{
|
||||||
|
auto_savepoint => 1,
|
||||||
|
Callbacks => {
|
||||||
|
connected => sub {
|
||||||
|
shift->do('set timezone = UTC');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return $schema;
|
return $schema;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user