You are here

function hybridauth_dmy_to_date in HybridAuth Social Login 7.2

Rules action.

File

./hybridauth.rules.inc, line 125
Functions for integrating the HybridAuth module with Rules.

Code

function hybridauth_dmy_to_date($day, $month, $year) {

  // My tests have shown there is no need for any timezone handling.
  // $timezone = date_default_timezone_get();
  // date_default_timezone_set('UTC');
  $timestamp = mktime(0, 0, 0, intval($month), intval($day), intval($year));

  // $timestamp = mktime(0, 0, 0, $month, $day, $year);
  // date_default_timezone_set($timezone);
  return array(
    'date' => $timestamp,
  );
}