How to use prefix for Model and table with timestamp with time zone

Hi Folks,

I need help on below points:

  1. I have a table like 'epmsites', I need help to create model for this. if I am using 'epmsites' model are working fine. But I need models with prefix 'epm'. _2. I have a field in postgresql like 'createdate' with 'timestamp with time zone', let me know what is correct date() regexpression or method to add this.

Thanks



261
edited Mar '16

Use following in model:

public function initialize() { $this->setSource("epm_sites"); }

date("c")

c ISO 8601 date (added in PHP 5) 2004-02-12T15:19:21+00:00

http://php.net/manual/en/function.date.php