Saving date field programmatically on node, but not on profile I'm saving some date field on the code both on node and profile entity. I'm success on saving it for nodes, but when I try to save for profile2 entity, using the same chunck of code, no data is saved. 

I'm doing this to nodes (after creating a new node with entity API):

// Creating a node and an entity wrapper
$entity = entity_create('node', $values);
$ewrapper = entity_metadata_wrapper('node', $entity);
// Saving the date field
$entity-&gt;field_date[LANGUAGE_NONE][0] = array(
   'value' =&gt; strtotime($date),
   'timezone' =&gt; date_default_timezone(),
   'timezone_db' =&gt; date_default_timezone(),
   'date_type' =&gt; 'datestamp'
 );
//Saving the node 
$ewrapper-&gt;save();


And almost the same way with profiles:

//Creating a profile2 'info' bundle     
$profile_info = profile2_create(array('type' =&gt; 'info', 'uid' =&gt; $user-&gt;uid));
// Trying to save the date field, same way as above
$profile_info-&gt;field_date[LANGUAGE_NONE][0] = array(
   'value' =&gt; strtotime($mydate),
   'timezone' =&gt; date_default_timezone(),
   'timezone_db' =&gt; date_default_timezone(),
   'date_type' =&gt; 'datestamp'
 );
// Saving the profile
profile2_save($profile_info);


If someone knows what is happening I'd appreciate!
This might or might not fix your problem but since you're using entity metadata wrappers, you should use them fully:

$profile = profile2_create(...);
$profile_wrapper = entity_metadata_wrapper('profile2', $profile);
$profile_wrapper-&gt;field_date = array(...);
$profile_wrapper-&gt;save();


The above snippet can also be used with nodes, just replacing the creation &amp; wrapper instantiation.

Also, if you're using a single timezone, you can safely omit it and just specify the actual timestamp value.  You should probably omit the 'date_type' key too, that's inferred by the field config and could be causing issues.

In fact, you should just do: $profile_wrapper-&gt;field_date = 123456; // (timestamp)

Tested locally and it works!

You shouldn't use LANGUAGE_NONE or [0] indices because not only might it break i18n if you're translating fields but it's also not very robust.