diff --git wp-includes/functions.php wp-includes/functions.php
index eb9715d..67f2231 100644
--- wp-includes/functions.php
+++ wp-includes/functions.php
@@ -3265,6 +3265,30 @@ function global_terms_enabled() {
 }
 
 /**
+ * Get the timezone object
+ *
+ * Uses timezone_string for a proper timezone if available, otherwise falls back
+ * to an offset.
+ *
+ * @return DateTimeZone
+ */
+function wp_get_timezone() {
+	$tzstring = get_option( 'timezone_string' );
+	if ( ! $tzstring ) {
+		// Create a UTC+- zone if no timezone string exists
+		$current_offset = get_option( 'gmt_offset' );
+		if ( 0 == $current_offset )
+			$tzstring = 'UTC';
+		elseif ($current_offset < 0)
+			$tzstring = 'Etc/GMT' . $current_offset;
+		else
+			$tzstring = 'Etc/GMT+' . $current_offset;
+	}
+	$zone = new DateTimeZone( $tzstring );
+	return $zone;
+}
+
+/**
  * gmt_offset modification for smart timezone handling.
  *
  * Overrides the gmt_offset option if we have a timezone_string available.
