function visitors_timezone_diff in Visitors 8.2
Same name and namespace in other branches
- 8 visitors.module \visitors_timezone_diff()
- 7.2 visitors.module \visitors_timezone_diff()
- 7 visitors.module \visitors_timezone_diff()
- 7.0 visitors.module \visitors_timezone_diff()
Get difference in seconds user timezone and GMT.
Return value
int
5 calls to visitors_timezone_diff()
- visitors_get_from_timestamp in ./
visitors.module - Convert from date value to timestamp.
- visitors_get_to_timestamp in ./
visitors.module - Convert to date value to timestamp.
- visitors_mysql_date_format_sql in ./
visitors.module - Set date format for mysql sql query.
- visitors_pgsql_date_format_sql in ./
visitors.module - Set date format for pgsql sql query.
- visitors_sqlite_date_format_sql in ./
visitors.module - Set date format for sqlite sql query.
File
- ./
visitors.module, line 71 - Logs visitors for your site.
Code
function visitors_timezone_diff() {
$timezone = date_default_timezone_get();
return timezone_offset_get(timezone_open($timezone), date_create());
}