I have never used DBIx :: Class until today, so I am completely new to it.
I'm not sure if this is possible or not, but basically I have a table in my SQLite database that has a timestamp column in it. The default value for the timestamp column is "CURRENT_TIMESTAMP". SQLite stores this in the GMT time zone, but my server is in the time zone of the CDT.
My SQLite query to get the timestamp in the correct time zone:
select datetime(timestamp, 'localtime') from mytable where id=1;
I am wondering if it is possible in my DBIx schema for "MyTable" to force it to use the datetime function each time it retrieves the "timestamp" field from the database?
In the cookbook, it looks like this can be done using the function → search (), but I'm wondering if it is possible to do this if I use the search functions (), find (), all (), find_or_new () or any function that pulls out this column is from the database, will the SQLite datetime () function be applied to it?
DBIx :: The class seems to have a lot of documentation - I think I'm just so new to this. I do not find the right places / things to search.
Thanks in advance!
source share