1 utility.inc views_get_timezone()

Figure out what timezone we're in; needed for some date manipulations.

File

core/modules/views/includes/utility.inc, line 310
Utility functions for assembling Views queries.

Code

function views_get_timezone() {
  $timezone = backdrop_get_user_timezone();

  // set up the database timezone
  $offset = '+00:00';
  static $already_set = FALSE;
  if (!$already_set) {
    db_query("SET @@session.time_zone = '$offset'");
    $already_set = true;
  }

  return $timezone;
}