You are here

function rb_misc_action_get_time in Rules Bonus Pack 6

The 'rb_misc_action_get_time' action.

File

./rb_misc.module, line 278
Miscellaneous conditions and actions for Rules.

Code

function rb_misc_action_get_time($settings) {

  // Get UTC time or time with user's time zone.
  if ($settings['utc']) {
    $time = format_date(time(), 'custom', $settings['format'], '');
  }
  else {
    $time = format_date(time(), 'custom', $settings['format']);
  }
  return array(
    'current_time' => $time,
  );
}