You are here

function visitors_get_from_timestamp in Visitors 7.2

Same name and namespace in other branches
  1. 8.2 visitors.module \visitors_get_from_timestamp()
  2. 8 forms/date_filter.inc \visitors_get_from_timestamp()
  3. 7 forms/date_filter.inc \visitors_get_from_timestamp()
  4. 7.0 forms/date_filter.inc \visitors_get_from_timestamp()

Convert from date value to timestamp.

Return value

returns the Unix timestamp of the session arguments given. If the arguments are invalid, the function returns FALSE (before PHP 5.1 it returned -1).

1 call to visitors_get_from_timestamp()
visitors_date_filter_sql_condition in forms/date_filter.inc
Build sql query from date filter values.

File

forms/date_filter.inc, line 213
Date filter form for the visitors module.

Code

function visitors_get_from_timestamp() {
  $diff = visitors_timezone_diff();
  $from = $_SESSION['visitors_from'];
  return gmmktime(0, 0, 0, $from['month'], $from['day'], $from['year']) - $diff;
}