I think the title says it: I want to use ISO 8601 with timezones as default DateTime-Format in Laravels Eloquent. I got this
class mEloquent extends Eloquent {
protected function getDateFormat()
{
return 'YYYY-MM-DDThh:mm:ss.sTZD';
}
}
All my models will extend mEloquent. But how should I build the tables? Just
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateUsersTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function(Blueprint $table)
{
$table->increments('id');
$table->string('firstName');
$table->string('lastName');
$table->string('email')->unique();
$table->string('password');
$table->timestamps();
});
} ......
as normal? How can I compare this dateformat? Or shoud I just use the default one and save the timezone separately?