[Dbix-class] Where to set database date format for InflateColumn::DateTime?

2014-04-17 Thread Adam Witney
Hi, I have a Catalyst/DBIx::Class application but I am having trouble with datetime inflation. I have a PostgreSQL database with datestyle SQL, DMY and timezone GB. The table has a field with datatype timestamp without timezone, so my dates look like 15/04/2014 13:41:50 in the database.

Re: [Dbix-class] Where to set database date format for InflateColumn::DateTime?

2014-04-17 Thread Hartmaier Alexander
Hi, On 2014-04-17 12:51, Adam Witney wrote: Hi, I have a Catalyst/DBIx::Class application but I am having trouble with datetime inflation. I have a PostgreSQL database with datestyle SQL, DMY and timezone GB. The table has a field with datatype timestamp without timezone, so my dates

Re: [Dbix-class] Where to set database date format for InflateColumn::DateTime?

2014-04-17 Thread Adam Witney
On 17. 4. 2014 12:12, Hartmaier Alexander wrote: Hi, On 2014-04-17 12:51, Adam Witney wrote: Hi, I have a Catalyst/DBIx::Class application but I am having trouble with datetime inflation. I have a PostgreSQL database with datestyle SQL, DMY and timezone GB. The table has a field with

Re: [Dbix-class] Where to set database date format for InflateColumn::DateTime?

2014-04-17 Thread Hartmaier Alexander
On 2014-04-17 13:41, Adam Witney wrote: On 17. 4. 2014 12:12, Hartmaier Alexander wrote: Hi, On 2014-04-17 12:51, Adam Witney wrote: Hi, I have a Catalyst/DBIx::Class application but I am having trouble with datetime inflation. I have a PostgreSQL database with datestyle SQL, DMY and

Re: [Dbix-class] Where to set database date format for InflateColumn::DateTime?

2014-04-17 Thread Adam Witney
Great thanks, on_connect_do = SET datestyle = 'sql, mdy', did the trick mea culpa! You should use on_connect_call = 'datetime_setup' which does the right thing for every supported RDBMS, so you can use your model e.g. for testing on sqlplus but deploy to postgres. ok great thanks,

Re: [Dbix-class] Where to set database date format for InflateColumn::DateTime?

2014-04-17 Thread Will Crawford
Set the default value to be \'CURRENT_TIMESTAMP' On 17 April 2014 13:37, Adam Witney awit...@sgul.ac.uk wrote: Great thanks, on_connect_do = SET datestyle = 'sql, mdy', did the trick mea culpa! You should use on_connect_call = 'datetime_setup' which does the right thing for every

Re: [Dbix-class] Where to set database date format for InflateColumn::DateTime?

2014-04-17 Thread Adam Witney
On 17. 4. 2014 13:45, Will Crawford wrote: Set the default value to be \'CURRENT_TIMESTAMP' do you mean in the database? if so, this has the same problem Thanks ___ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC:

Re: [Dbix-class] Where to set database date format for InflateColumn::DateTime?

2014-04-17 Thread Hartmaier Alexander
On 2014-04-17 14:37, Adam Witney wrote: Great thanks, on_connect_do = SET datestyle = 'sql, mdy', did the trick mea culpa! You should use on_connect_call = 'datetime_setup' which does the right thing for every supported RDBMS, so you can use your model e.g. for testing on sqlplus but

Re: [Dbix-class] Where to set database date format for InflateColumn::DateTime?

2014-04-17 Thread Adam Witney
On 17. 4. 2014 14:20, Hartmaier Alexander wrote: On 2014-04-17 14:37, Adam Witney wrote: Great thanks, on_connect_do = SET datestyle = 'sql, mdy', did the trick mea culpa! You should use on_connect_call = 'datetime_setup' which does the right thing for every supported RDBMS, so you

Re: [Dbix-class] Where to set database date format for InflateColumn::DateTime?

2014-04-17 Thread Hartmaier Alexander
On 2014-04-17 15:29, Adam Witney wrote: On 17. 4. 2014 14:20, Hartmaier Alexander wrote: On 2014-04-17 14:37, Adam Witney wrote: Great thanks, on_connect_do = SET datestyle = 'sql, mdy', did the trick mea culpa! You should use on_connect_call = 'datetime_setup' which does the right

Re: [Dbix-class] Where to set database date format for InflateColumn::DateTime?

2014-04-17 Thread Adam Witney
On 17. 4. 2014 14:34, Hartmaier Alexander wrote: On 2014-04-17 15:29, Adam Witney wrote: On 17. 4. 2014 14:20, Hartmaier Alexander wrote: On 2014-04-17 14:37, Adam Witney wrote: Great thanks, on_connect_do = SET datestyle = 'sql, mdy', did the trick mea culpa! You should use

Re: [Dbix-class] Where to set database date format for InflateColumn::DateTime?

2014-04-17 Thread Hartmaier Alexander
On 2014-04-17 16:10, Adam Witney wrote: On 17. 4. 2014 14:34, Hartmaier Alexander wrote: On 2014-04-17 15:29, Adam Witney wrote: On 17. 4. 2014 14:20, Hartmaier Alexander wrote: On 2014-04-17 14:37, Adam Witney wrote: Great thanks, on_connect_do = SET datestyle = 'sql, mdy', did