Hello,

i created a date field in file entity to collect the current date.
With a hook_form_alter, i tried to automaticaly insert the current date in this field when i add a file in Drupal.
I use this code:

function mymodule_form_alter {
$form['field_test']['und'][0]['#default_value'] = array (
	 'value' => format_date(strtotime('now'), 'custom', 'Y-m-d\TH:i:s', 'UTC'),
	'#type' => 'date',
);
}

But, the generated date is different of the current date :
current date : 18/10/2013 - 16:19
generated date : 18/10/2013 - 16:15

I have a lag of a few minutes.
My timezone is Europe/Paris.

Thanks for your help.