Index: wp-admin/credits.php
===================================================================
--- wp-admin/credits.php	(revision 21233)
+++ wp-admin/credits.php	(working copy)
@@ -30,7 +30,7 @@
 		if ( ! is_array( $results ) )
 			return false;
 
-		set_site_transient( 'wordpress_credits_' . $locale, $results, 86400 ); // One day
+		set_site_transient( 'wordpress_credits_' . $locale, $results, DAY_IN_SECONDS );
 	}
 
 	return $results;
Index: wp-admin/includes/class-wp-comments-list-table.php
===================================================================
--- wp-admin/includes/class-wp-comments-list-table.php	(revision 21233)
+++ wp-admin/includes/class-wp-comments-list-table.php	(working copy)
@@ -330,7 +330,7 @@
 		$the_comment_status = wp_get_comment_status( $comment->comment_ID );
 
 		$ptime = date( 'G', strtotime( $comment->comment_date ) );
-		if ( ( abs( time() - $ptime ) ) < 86400 )
+		if ( ( abs( time() - $ptime ) ) < DAY_IN_SECONDS )
 			$ptime = sprintf( __( '%s ago' ), human_time_diff( $ptime ) );
 		else
 			$ptime = mysql2date( __( 'Y/m/d \a\t g:i A' ), $comment->comment_date );
Index: wp-admin/includes/class-wp-media-list-table.php
===================================================================
--- wp-admin/includes/class-wp-media-list-table.php	(revision 21233)
+++ wp-admin/includes/class-wp-media-list-table.php	(working copy)
@@ -279,7 +279,7 @@
 			$t_time = get_the_time( __( 'Y/m/d g:i:s A' ) );
 			$m_time = $post->post_date;
 			$time = get_post_time( 'G', true, $post, false );
-			if ( ( abs( $t_diff = time() - $time ) ) < 86400 ) {
+			if ( ( abs( $t_diff = time() - $time ) ) < DAY_IN_SECONDS ) {
 				if ( $t_diff < 0 )
 					$h_time = sprintf( __( '%s from now' ), human_time_diff( $time ) );
 				else
Index: wp-admin/includes/class-wp-plugins-list-table.php
===================================================================
--- wp-admin/includes/class-wp-plugins-list-table.php	(revision 21233)
+++ wp-admin/includes/class-wp-plugins-list-table.php	(working copy)
@@ -69,14 +69,13 @@
 			}
 		}
 
-		set_transient( 'plugin_slugs', array_keys( $plugins['all'] ), 86400 );
+		set_transient( 'plugin_slugs', array_keys( $plugins['all'] ), DAY_IN_SECONDS );
 
 		if ( ! $screen->is_network ) {
 			$recently_activated = get_option( 'recently_activated', array() );
 
-			$one_week = 7*24*60*60;
 			foreach ( $recently_activated as $key => $time )
-				if ( $time + $one_week < time() )
+				if ( $time + WEEK_IN_SECONDS < time() )
 					unset( $recently_activated[$key] );
 			update_option( 'recently_activated', $recently_activated );
 		}
Index: wp-admin/includes/class-wp-posts-list-table.php
===================================================================
--- wp-admin/includes/class-wp-posts-list-table.php	(revision 21233)
+++ wp-admin/includes/class-wp-posts-list-table.php	(working copy)
@@ -573,7 +573,7 @@
 
 					$time_diff = time() - $time;
 
-					if ( $time_diff > 0 && $time_diff < 24*60*60 )
+					if ( $time_diff > 0 && $time_diff < DAY_IN_SECONDS )
 						$h_time = sprintf( __( '%s ago' ), human_time_diff( $time ) );
 					else
 						$h_time = mysql2date( __( 'Y/m/d' ), $m_time );
Index: wp-admin/includes/dashboard.php
===================================================================
--- wp-admin/includes/dashboard.php	(revision 21233)
+++ wp-admin/includes/dashboard.php	(working copy)
@@ -913,7 +913,7 @@
 
 	if ( false === $plugin_slugs = get_transient( 'plugin_slugs' ) ) {
 		$plugin_slugs = array_keys( get_plugins() );
-		set_transient( 'plugin_slugs', $plugin_slugs, 86400 );
+		set_transient( 'plugin_slugs', $plugin_slugs, DAY_IN_SECONDS );
 	}
 
 	foreach ( array( 'popular' => __('Most Popular'), 'new' => __('Newest Plugins') ) as $feed => $label ) {
@@ -1021,7 +1021,7 @@
 		array_unshift( $args, $widget_id );
 		ob_start();
 		call_user_func_array( $callback, $args );
-		set_transient( $cache_key, ob_get_flush(), 43200); // Default lifetime in cache of 12 hours (same as the feeds)
+		set_transient( $cache_key, ob_get_flush(), 12 * HOUR_IN_SECONDS ); // Default lifetime in cache of 12 hours (same as the feeds)
 	}
 
 	return true;
@@ -1212,7 +1212,7 @@
 		if ( ! is_array( $response ) )
 			return false;
 
-		set_site_transient( 'browser_' . $key, $response, 604800 ); // cache for 1 week
+		set_site_transient( 'browser_' . $key, $response, WEEK_IN_SECONDS );
 	}
 
 	return $response;
Index: wp-admin/includes/import.php
===================================================================
--- wp-admin/includes/import.php	(revision 21233)
+++ wp-admin/includes/import.php	(working copy)
@@ -89,7 +89,7 @@
 	$id = wp_insert_attachment( $object, $file );
 
 	// schedule a cleanup for one day from now in case of failed import or missing wp_import_cleanup() call
-	wp_schedule_single_event( time() + 86400, 'importer_scheduled_cleanup', array( $id ) );
+	wp_schedule_single_event( time() + DAY_IN_SECONDS, 'importer_scheduled_cleanup', array( $id ) );
 
 	return array( 'file' => $file, 'id' => $id );
 }
Index: wp-admin/includes/nav-menu.php
===================================================================
--- wp-admin/includes/nav-menu.php	(revision 21233)
+++ wp-admin/includes/nav-menu.php	(working copy)
@@ -1150,7 +1150,7 @@
  */
 function _wp_delete_orphaned_draft_menu_items() {
 	global $wpdb;
-	$delete_timestamp = time() - (60*60*24*EMPTY_TRASH_DAYS);
+	$delete_timestamp = time() - ( DAY_IN_SECONDS * EMPTY_TRASH_DAYS );
 
 	// delete orphaned draft menu items
 	$menu_items_to_delete = $wpdb->get_col($wpdb->prepare("SELECT ID FROM $wpdb->posts AS p LEFT JOIN $wpdb->postmeta AS m ON p.ID = m.post_id WHERE post_type = 'nav_menu_item' AND post_status = 'draft' AND meta_key = '_menu_item_orphaned' AND meta_value < '%d'", $delete_timestamp ) );
Index: wp-admin/includes/plugin-install.php
===================================================================
--- wp-admin/includes/plugin-install.php	(revision 21233)
+++ wp-admin/includes/plugin-install.php	(working copy)
@@ -74,7 +74,7 @@
 	if ( is_wp_error($tags) )
 		return $tags;
 
-	set_site_transient('poptags_' . $key, $tags, 10800); // 3 * 60 * 60 = 10800
+	set_site_transient( 'poptags_' . $key, $tags, 3 * HOUR_IN_SECONDS );
 
 	return $tags;
 }
Index: wp-admin/includes/upgrade.php
===================================================================
--- wp-admin/includes/upgrade.php	(revision 21233)
+++ wp-admin/includes/upgrade.php	(working copy)
@@ -567,11 +567,11 @@
 	$time_difference = $all_options->time_difference;
 
 		$server_time = time()+date('Z');
-	$weblogger_time = $server_time + $time_difference*3600;
+	$weblogger_time = $server_time + $time_difference * HOUR_IN_SECONDS;
 	$gmt_time = time();
 
-	$diff_gmt_server = ($gmt_time - $server_time) / 3600;
-	$diff_weblogger_server = ($weblogger_time - $server_time) / 3600;
+	$diff_gmt_server = ($gmt_time - $server_time) / HOUR_IN_SECONDS;
+	$diff_weblogger_server = ($weblogger_time - $server_time) / HOUR_IN_SECONDS;
 	$diff_gmt_weblogger = $diff_gmt_server - $diff_weblogger_server;
 	$gmt_offset = -$diff_gmt_weblogger;
 
Index: wp-admin/load-scripts.php
===================================================================
--- wp-admin/load-scripts.php	(revision 21233)
+++ wp-admin/load-scripts.php	(working copy)
@@ -125,7 +125,7 @@
 
 $compress = ( isset($_GET['c']) && $_GET['c'] );
 $force_gzip = ( $compress && 'gzip' == $_GET['c'] );
-$expires_offset = 31536000;
+$expires_offset = YEAR_IN_SECONDS;
 $out = '';
 
 $wp_scripts = new WP_Scripts();
Index: wp-admin/load-styles.php
===================================================================
--- wp-admin/load-styles.php	(revision 21233)
+++ wp-admin/load-styles.php	(working copy)
@@ -104,7 +104,7 @@
 $compress = ( isset($_GET['c']) && $_GET['c'] );
 $force_gzip = ( $compress && 'gzip' == $_GET['c'] );
 $rtl = ( isset($_GET['dir']) && 'rtl' == $_GET['dir'] );
-$expires_offset = 31536000;
+$expires_offset = YEAR_IN_SECONDS;
 $out = '';
 
 $wp_styles = new WP_Styles();
Index: wp-includes/bookmark-template.php
===================================================================
--- wp-includes/bookmark-template.php	(revision 21233)
+++ wp-includes/bookmark-template.php	(working copy)
@@ -79,7 +79,7 @@
 		if ( $show_updated )
 			if ( '00' != substr($bookmark->link_updated_f, 0, 2) ) {
 				$title .= ' (';
-				$title .= sprintf(__('Last updated: %s'), date(get_option('links_updated_date_format'), $bookmark->link_updated_f + (get_option('gmt_offset') * 3600)));
+				$title .= sprintf(__('Last updated: %s'), date(get_option('links_updated_date_format'), $bookmark->link_updated_f + (get_option('gmt_offset') * HOUR_IN_SECONDS)));
 				$title .= ')';
 			}
 
Index: wp-includes/class-feed.php
===================================================================
--- wp-includes/class-feed.php	(revision 21233)
+++ wp-includes/class-feed.php	(working copy)
@@ -18,7 +18,7 @@
 class WP_Feed_Cache_Transient {
 	var $name;
 	var $mod_name;
-	var $lifetime = 43200; //Default lifetime in cache of 12 hours
+	var $lifetime = 12 * HOUR_IN_SECONDS; //Default lifetime in cache of 12 hours
 
 	function __construct($location, $filename, $extension) {
 		$this->name = 'feed_' . $filename;
Index: wp-includes/class-http.php
===================================================================
--- wp-includes/class-http.php	(revision 21233)
+++ wp-includes/class-http.php	(working copy)
@@ -808,7 +808,7 @@
 		if ( ! function_exists( 'fsockopen' ) )
 			return false;
 
-		if ( false !== ($option = get_option( 'disable_fsockopen' )) && time()-$option < 43200 ) // 12 hours
+		if ( false !== ( $option = get_option( 'disable_fsockopen' ) ) && time() - $option < 12 * HOUR_IN_SECONDS )
 			return false;
 
 		$is_ssl = isset( $args['ssl'] ) && $args['ssl'];
Index: wp-includes/comment.php
===================================================================
--- wp-includes/comment.php	(revision 21233)
+++ wp-includes/comment.php	(working copy)
@@ -694,7 +694,7 @@
 	global $wpdb;
 	if ( current_user_can( 'manage_options' ) )
 		return; // don't throttle admins
-	$hour_ago = gmdate( 'Y-m-d H:i:s', time() - 3600 );
+	$hour_ago = gmdate( 'Y-m-d H:i:s', time() - HOUR_IN_SECONDS );
 	if ( $lasttime = $wpdb->get_var( $wpdb->prepare( "SELECT `comment_date_gmt` FROM `$wpdb->comments` WHERE `comment_date_gmt` >= %s AND ( `comment_author_IP` = %s OR `comment_author_email` = %s ) ORDER BY `comment_date_gmt` DESC LIMIT 1", $hour_ago, $ip, $email ) ) ) {
 		$time_lastcomment = mysql2date('U', $lasttime, false);
 		$time_newcomment  = mysql2date('U', $date, false);
@@ -1976,7 +1976,7 @@
 	if ( ! $days_old )
 		return $posts;
 
-	if ( time() - strtotime( $posts[0]->post_date_gmt ) > ( $days_old * 24 * 60 * 60 ) ) {
+	if ( time() - strtotime( $posts[0]->post_date_gmt ) > ( $days_old * DAY_IN_SECONDS ) ) {
 		$posts[0]->comment_status = 'closed';
 		$posts[0]->ping_status = 'closed';
 	}
@@ -2011,7 +2011,7 @@
 	if ( ! in_array( $post->post_type, $post_types ) )
 		return $open;
 
-	if ( time() - strtotime( $post->post_date_gmt ) > ( $days_old * 24 * 60 * 60 ) )
+	if ( time() - strtotime( $post->post_date_gmt ) > ( $days_old * DAY_IN_SECONDS ) )
 		return false;
 
 	return $open;
Index: wp-includes/cron.php
===================================================================
--- wp-includes/cron.php	(revision 21233)
+++ wp-includes/cron.php	(working copy)
@@ -206,7 +206,7 @@
 	*/
 	$lock = get_transient('doing_cron');
 
-	if ( $lock > $local_time + 10*60 )
+	if ( $lock > $local_time + 10 * MINUTE_IN_SECONDS )
 		$lock = 0;
 
 	// don't run if another process is currently running it or more than once every 60 sec.
@@ -313,9 +313,9 @@
  */
 function wp_get_schedules() {
 	$schedules = array(
-		'hourly' => array( 'interval' => 3600, 'display' => __('Once Hourly') ),
-		'twicedaily' => array( 'interval' => 43200, 'display' => __('Twice Daily') ),
-		'daily' => array( 'interval' => 86400, 'display' => __('Once Daily') ),
+		'hourly' => array( 'interval' => HOUR_IN_SECONDS, 'display' => __('Once Hourly') ),
+		'twicedaily' => array( 'interval' => 12 * HOUR_IN_SECONDS, 'display' => __('Twice Daily') ),
+		'daily' => array( 'interval' => DAY_IN_SECONDS, 'display' => __('Once Daily') ),
 	);
 	return array_merge( apply_filters( 'cron_schedules', array() ), $schedules );
 }
Index: wp-includes/default-constants.php
===================================================================
--- wp-includes/default-constants.php	(revision 21233)
+++ wp-includes/default-constants.php	(working copy)
@@ -299,3 +299,20 @@
 		define( 'WP_DEFAULT_THEME', 'twentyeleven' );
 
 }
+
+/**
+ * Defines time-related WordPress constants
+ *
+ * @since 3.5.0
+ */
+function wp_time_constants( ) {
+	/**
+	 * Constants for expressing human-interval intervals in their
+	 * respective number of seconds
+	 */
+	define( 'MINUTE_IN_SECONDS', 60 );
+	define( 'HOUR_IN_SECONDS', 60 * MINUTE_IN_SECONDS );
+	define( 'DAY_IN_SECONDS', 24 * HOUR_IN_SECONDS );
+	define( 'WEEK_IN_SECONDS', 7 * DAY_IN_SECONDS );
+	define( 'YEAR_IN_SECONDS', 365 * DAY_IN_SECONDS );
+}
Index: wp-includes/deprecated.php
===================================================================
--- wp-includes/deprecated.php	(revision 21233)
+++ wp-includes/deprecated.php	(working copy)
@@ -984,7 +984,7 @@
 
 		if ( $show_updated )
 			if (substr($row->link_updated_f, 0, 2) != '00')
-				$title .= ' ('.__('Last updated') . ' ' . date(get_option('links_updated_date_format'), $row->link_updated_f + (get_option('gmt_offset') * 3600)) . ')';
+				$title .= ' ('.__('Last updated') . ' ' . date(get_option('links_updated_date_format'), $row->link_updated_f + (get_option('gmt_offset') * HOUR_IN_SECONDS)) . ')';
 
 		if ( '' != $title )
 			$title = ' title="' . $title . '"';
Index: wp-includes/feed.php
===================================================================
--- wp-includes/feed.php	(revision 21233)
+++ wp-includes/feed.php	(working copy)
@@ -534,7 +534,7 @@
 	$feed->set_feed_url($url);
 	$feed->set_cache_class('WP_Feed_Cache');
 	$feed->set_file_class('WP_SimplePie_File');
-	$feed->set_cache_duration(apply_filters('wp_feed_cache_transient_lifetime', 43200, $url));
+	$feed->set_cache_duration( apply_filters( 'wp_feed_cache_transient_lifetime', 12 * HOUR_IN_SECONDS, $url ) );
 	do_action_ref_array( 'wp_feed_options', array( &$feed, $url ) );
 	$feed->init();
 	$feed->handle_content_type();
Index: wp-includes/formatting.php
===================================================================
--- wp-includes/formatting.php	(revision 21233)
+++ wp-includes/formatting.php	(working copy)
@@ -1872,13 +1872,13 @@
 		$datetime = new DateTime( $string );
 		$datetime->setTimezone( new DateTimeZone('UTC') );
 		$offset = $datetime->getOffset();
-		$datetime->modify( '+' . $offset / 3600 . ' hours');
+		$datetime->modify( '+' . $offset / HOUR_IN_SECONDS . ' hours');
 		$string_gmt = gmdate($format, $datetime->format('U'));
 
 		date_default_timezone_set('UTC');
 	} else {
 		$string_time = gmmktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]);
-		$string_gmt = gmdate($format, $string_time - get_option('gmt_offset') * 3600);
+		$string_gmt = gmdate($format, $string_time - get_option('gmt_offset') * HOUR_IN_SECONDS);
 	}
 	return $string_gmt;
 }
@@ -1898,7 +1898,7 @@
 function get_date_from_gmt($string, $format = 'Y-m-d H:i:s') {
 	preg_match('#([0-9]{1,4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})#', $string, $matches);
 	$string_time = gmmktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]);
-	$string_localtime = gmdate($format, $string_time + get_option('gmt_offset')*3600);
+	$string_localtime = gmdate($format, $string_time + get_option('gmt_offset') * HOUR_IN_SECONDS);
 	return $string_localtime;
 }
 
@@ -1918,7 +1918,7 @@
 		$sign    = (substr($timezone, 0, 1) == '+') ? 1 : -1;
 		$hours   = intval(substr($timezone, 1, 2));
 		$minutes = intval(substr($timezone, 3, 4)) / 60;
-		$offset  = $sign * 3600 * ($hours + $minutes);
+		$offset  = $sign * HOUR_IN_SECONDS * ($hours + $minutes);
 	}
 	return $offset;
 }
@@ -1942,7 +1942,7 @@
 		if (!empty($date_bits[7])) { // we have a timezone, so let's compute an offset
 			$offset = iso8601_timezone_to_offset($date_bits[7]);
 		} else { // we don't have a timezone, so we assume user local timezone (not server's!)
-			$offset = 3600 * get_option('gmt_offset');
+			$offset = HOUR_IN_SECONDS * get_option('gmt_offset');
 		}
 
 		$timestamp = gmmktime($date_bits[4], $date_bits[5], $date_bits[6], $date_bits[2], $date_bits[3], $date_bits[1]);
@@ -2067,28 +2067,28 @@
  * @return string Human readable time difference.
  */
 function human_time_diff( $from, $to = '' ) {
-	if ( empty($to) )
+	if ( empty( $to ) )
 		$to = time();
-	$diff = (int) abs($to - $from);
-	if ($diff <= 3600) {
-		$mins = round($diff / 60);
-		if ($mins <= 1) {
+	$diff = (int) abs( $to - $from );
+	if ( $diff <= HOUR_IN_SECONDS ) {
+		$mins = round( $diff / 60 );
+		if ( $mins <= 1 ) {
 			$mins = 1;
 		}
 		/* translators: min=minute */
-		$since = sprintf(_n('%s min', '%s mins', $mins), $mins);
-	} else if (($diff <= 86400) && ($diff > 3600)) {
-		$hours = round($diff / 3600);
-		if ($hours <= 1) {
+		$since = sprintf( _n( '%s min', '%s mins', $mins ), $mins );
+	} elseif ( ( $diff <= DAY_IN_SECONDS ) && ( $diff > HOUR_IN_SECONDS ) ) {
+		$hours = round( $diff / HOUR_IN_SECONDS );
+		if ( $hours <= 1 ) {
 			$hours = 1;
 		}
-		$since = sprintf(_n('%s hour', '%s hours', $hours), $hours);
-	} elseif ($diff >= 86400) {
-		$days = round($diff / 86400);
-		if ($days <= 1) {
+		$since = sprintf( _n( '%s hour', '%s hours', $hours ), $hours );
+	} elseif ( $diff >= DAY_IN_SECONDS ) {
+		$days = round( $diff / DAY_IN_SECONDS );
+		if ( $days <= 1 ) {
 			$days = 1;
 		}
-		$since = sprintf(_n('%s day', '%s days', $days), $days);
+		$since = sprintf( _n( '%s day', '%s days', $days ), $days );
 	}
 	return $since;
 }
Index: wp-includes/functions.php
===================================================================
--- wp-includes/functions.php	(revision 21233)
+++ wp-includes/functions.php	(working copy)
@@ -59,10 +59,10 @@
 function current_time( $type, $gmt = 0 ) {
 	switch ( $type ) {
 		case 'mysql':
-			return ( $gmt ) ? gmdate( 'Y-m-d H:i:s' ) : gmdate( 'Y-m-d H:i:s', ( time() + ( get_option( 'gmt_offset' ) * 3600 ) ) );
+			return ( $gmt ) ? gmdate( 'Y-m-d H:i:s' ) : gmdate( 'Y-m-d H:i:s', ( time() + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ) ) );
 			break;
 		case 'timestamp':
-			return ( $gmt ) ? time() : time() + ( get_option( 'gmt_offset' ) * 3600 );
+			return ( $gmt ) ? time() : time() + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS );
 			break;
 	}
 }
@@ -214,8 +214,8 @@
 	if ( $weekday < $start_of_week )
 		$weekday += 7;
 
-	$start = $day - 86400 * ( $weekday - $start_of_week ); // The most recent week start day on or before $day
-	$end = $start + 604799; // $start + 7 days - 1 second
+	$start = $day - DAY_IN_SECONDS * ( $weekday - $start_of_week ); // The most recent week start day on or before $day
+	$end = $start + 7 * DAY_IN_SECONDS - 1; // $start + 7 days - 1 second
 	return compact( 'start', 'end' );
 }
 
@@ -930,7 +930,7 @@
  * @since 2.1.0
  */
 function cache_javascript_headers() {
-	$expiresOffset = 864000; // 10 days
+	$expiresOffset = 10 * DAY_IN_SECONDS;
 	header( "Content-Type: text/javascript; charset=" . get_bloginfo( 'charset' ) );
 	header( "Vary: Accept-Encoding" ); // Handle proxies
 	header( "Expires: " . gmdate( "D, d M Y H:i:s", time() + $expiresOffset ) . " GMT" );
@@ -3020,7 +3020,7 @@
 	if ( false === $timezone_object || false === $datetime_object ) {
 		return false;
 	}
-	return round( timezone_offset_get( $timezone_object, $datetime_object ) / 3600, 2 );
+	return round( timezone_offset_get( $timezone_object, $datetime_object ) / HOUR_IN_SECONDS, 2 );
 }
 
 /**
@@ -3220,7 +3220,7 @@
 function wp_scheduled_delete() {
 	global $wpdb;
 
-	$delete_timestamp = time() - (60*60*24*EMPTY_TRASH_DAYS);
+	$delete_timestamp = time() - ( DAY_IN_SECONDS * EMPTY_TRASH_DAYS );
 
 	$posts_to_delete = $wpdb->get_results($wpdb->prepare("SELECT post_id FROM $wpdb->postmeta WHERE meta_key = '_wp_trash_meta_time' AND meta_value < '%d'", $delete_timestamp), ARRAY_A);
 
Index: wp-includes/js/tinymce/wp-tinymce.php
===================================================================
--- wp-includes/js/tinymce/wp-tinymce.php	(revision 21233)
+++ wp-includes/js/tinymce/wp-tinymce.php	(working copy)
@@ -19,7 +19,7 @@
 	return @file_get_contents($path);
 }
 
-$expires_offset = 31536000;
+$expires_offset = YEAR_IN_SECONDS;
 
 header('Content-Type: application/x-javascript; charset=UTF-8');
 header('Vary: Accept-Encoding'); // Handle proxies
Index: wp-includes/ms-functions.php
===================================================================
--- wp-includes/ms-functions.php	(revision 21233)
+++ wp-includes/ms-functions.php	(working copy)
@@ -1417,7 +1417,7 @@
 
 	$dirsize[ $directory ][ 'size' ] = recurse_dirsize( $directory );
 
-	set_transient( 'dirsize_cache', $dirsize, 3600 );
+	set_transient( 'dirsize_cache', $dirsize, HOUR_IN_SECONDS );
 	return $dirsize[ $directory ][ 'size' ];
 }
 
Index: wp-includes/option.php
===================================================================
--- wp-includes/option.php	(revision 21233)
+++ wp-includes/option.php	(working copy)
@@ -560,8 +560,8 @@
 		}
 	}
 
-	setcookie( 'wp-settings-' . $user->ID, $settings, time() + 31536000, SITECOOKIEPATH );
-	setcookie( 'wp-settings-time-' . $user->ID, time(), time() + 31536000, SITECOOKIEPATH );
+	setcookie( 'wp-settings-' . $user->ID, $settings, time() + YEAR_IN_SECONDS, SITECOOKIEPATH );
+	setcookie( 'wp-settings-time-' . $user->ID, time(), time() + YEAR_IN_SECONDS, SITECOOKIEPATH );
 	$_COOKIE['wp-settings-' . $user->ID] = $settings;
 }
 
@@ -724,7 +724,7 @@
 		return;
 
 	update_user_option( $user->ID, 'user-settings', '', false );
-	setcookie('wp-settings-' . $user->ID, ' ', time() - 31536000, SITECOOKIEPATH);
+	setcookie('wp-settings-' . $user->ID, ' ', time() - YEAR_IN_SECONDS, SITECOOKIEPATH);
 }
 
 /**
Index: wp-includes/pluggable.php
===================================================================
--- wp-includes/pluggable.php	(revision 21233)
+++ wp-includes/pluggable.php	(working copy)
@@ -529,7 +529,7 @@
 
 	// Allow a grace period for POST and AJAX requests
 	if ( defined('DOING_AJAX') || 'POST' == $_SERVER['REQUEST_METHOD'] )
-		$expired += 3600;
+		$expired += HOUR_IN_SECONDS;
 
 	// Quick check to see if an honest cookie has expired
 	if ( $expired < time() ) {
@@ -694,24 +694,24 @@
 function wp_clear_auth_cookie() {
 	do_action('clear_auth_cookie');
 
-	setcookie(AUTH_COOKIE, ' ', time() - 31536000, ADMIN_COOKIE_PATH, COOKIE_DOMAIN);
-	setcookie(SECURE_AUTH_COOKIE, ' ', time() - 31536000, ADMIN_COOKIE_PATH, COOKIE_DOMAIN);
-	setcookie(AUTH_COOKIE, ' ', time() - 31536000, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN);
-	setcookie(SECURE_AUTH_COOKIE, ' ', time() - 31536000, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN);
-	setcookie(LOGGED_IN_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN);
-	setcookie(LOGGED_IN_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN);
+	setcookie(AUTH_COOKIE, ' ', time() - YEAR_IN_SECONDS, ADMIN_COOKIE_PATH, COOKIE_DOMAIN);
+	setcookie(SECURE_AUTH_COOKIE, ' ', time() - YEAR_IN_SECONDS, ADMIN_COOKIE_PATH, COOKIE_DOMAIN);
+	setcookie(AUTH_COOKIE, ' ', time() - YEAR_IN_SECONDS, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN);
+	setcookie(SECURE_AUTH_COOKIE, ' ', time() - YEAR_IN_SECONDS, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN);
+	setcookie(LOGGED_IN_COOKIE, ' ', time() - YEAR_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN);
+	setcookie(LOGGED_IN_COOKIE, ' ', time() - YEAR_IN_SECONDS, SITECOOKIEPATH, COOKIE_DOMAIN);
 
 	// Old cookies
-	setcookie(AUTH_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN);
-	setcookie(AUTH_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN);
-	setcookie(SECURE_AUTH_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN);
-	setcookie(SECURE_AUTH_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN);
+	setcookie(AUTH_COOKIE, ' ', time() - YEAR_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN);
+	setcookie(AUTH_COOKIE, ' ', time() - YEAR_IN_SECONDS, SITECOOKIEPATH, COOKIE_DOMAIN);
+	setcookie(SECURE_AUTH_COOKIE, ' ', time() - YEAR_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN);
+	setcookie(SECURE_AUTH_COOKIE, ' ', time() - YEAR_IN_SECONDS, SITECOOKIEPATH, COOKIE_DOMAIN);
 
 	// Even older cookies
-	setcookie(USER_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN);
-	setcookie(PASS_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN);
-	setcookie(USER_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN);
-	setcookie(PASS_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN);
+	setcookie(USER_COOKIE, ' ', time() - YEAR_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN);
+	setcookie(PASS_COOKIE, ' ', time() - YEAR_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN);
+	setcookie(USER_COOKIE, ' ', time() - YEAR_IN_SECONDS, SITECOOKIEPATH, COOKIE_DOMAIN);
+	setcookie(PASS_COOKIE, ' ', time() - YEAR_IN_SECONDS, SITECOOKIEPATH, COOKIE_DOMAIN);
 }
 endif;
 
@@ -1234,7 +1234,7 @@
  * @return int
  */
 function wp_nonce_tick() {
-	$nonce_life = apply_filters('nonce_life', 86400);
+	$nonce_life = apply_filters('nonce_life', DAY_IN_SECONDS);
 
 	return ceil(time() / ( $nonce_life / 2 ));
 }
Index: wp-includes/taxonomy.php
===================================================================
--- wp-includes/taxonomy.php	(revision 21233)
+++ wp-includes/taxonomy.php	(working copy)
@@ -1384,7 +1384,7 @@
 	}
 
 	if ( empty($terms) ) {
-		wp_cache_add( $cache_key, array(), 'terms', 86400 ); // one day
+		wp_cache_add( $cache_key, array(), 'terms', DAY_IN_SECONDS );
 		$terms = apply_filters('get_terms', array(), $taxonomies, $args);
 		return $terms;
 	}
@@ -1435,7 +1435,7 @@
 		$terms = array_slice($terms, $offset, $number);
 	}
 
-	wp_cache_add( $cache_key, $terms, 'terms', 86400 ); // one day
+	wp_cache_add( $cache_key, $terms, 'terms', DAY_IN_SECONDS );
 
 	$terms = apply_filters('get_terms', $terms, $taxonomies, $args);
 	return $terms;
Index: wp-includes/update.php
===================================================================
--- wp-includes/update.php	(revision 21233)
+++ wp-includes/update.php	(working copy)
@@ -155,14 +155,14 @@
 	// Check for update on a different schedule, depending on the page.
 	switch ( current_filter() ) {
 		case 'load-update-core.php' :
-			$timeout = 60; // 1 min
+			$timeout = MINUTE_IN_SECONDS;
 			break;
 		case 'load-plugins.php' :
 		case 'load-update.php' :
-			$timeout = 3600; // 1 hour
+			$timeout = HOUR_IN_SECONDS;
 			break;
 		default :
-			$timeout = 43200; // 12 hours
+			$timeout = 12 * HOUR_IN_SECONDS;
 	}
 
 	$time_not_changed = isset( $current->last_checked ) && $timeout > ( time() - $current->last_checked );
@@ -264,14 +264,14 @@
 	// Check for update on a different schedule, depending on the page.
 	switch ( current_filter() ) {
 		case 'load-update-core.php' :
-			$timeout = 60; // 1 min
+			$timeout = MINUTE_IN_SECONDS;
 			break;
 		case 'load-themes.php' :
 		case 'load-update.php' :
-			$timeout = 3600; // 1 hour
+			$timeout = HOUR_IN_SECONDS;
 			break;
 		default :
-			$timeout = 43200; // 12 hours
+			$timeout = 12 * HOUR_IN_SECONDS;
 	}
 
 	$time_not_changed = isset( $last_update->last_checked ) && $timeout > ( time( ) - $last_update->last_checked );
@@ -371,7 +371,7 @@
 	$current = get_site_transient( 'update_core' );
 
 	if ( isset( $current->last_checked ) &&
-		43200 > ( time() - $current->last_checked ) &&
+		12 * HOUR_IN_SECONDS > ( time() - $current->last_checked ) &&
 		isset( $current->version_checked ) &&
 		$current->version_checked == $wp_version )
 		return;
@@ -390,7 +390,7 @@
  */
 function _maybe_update_plugins() {
 	$current = get_site_transient( 'update_plugins' );
-	if ( isset( $current->last_checked ) && 43200 > ( time() - $current->last_checked ) )
+	if ( isset( $current->last_checked ) && 12 * HOUR_IN_SECONDS > ( time() - $current->last_checked ) )
 		return;
 	wp_update_plugins();
 }
@@ -406,7 +406,7 @@
  */
 function _maybe_update_themes( ) {
 	$current = get_site_transient( 'update_themes' );
-	if ( isset( $current->last_checked ) && 43200 > ( time( ) - $current->last_checked ) )
+	if ( isset( $current->last_checked ) && 12 * HOUR_IN_SECONDS > ( time( ) - $current->last_checked ) )
 		return;
 
 	wp_update_themes();
Index: wp-login.php
===================================================================
--- wp-login.php	(revision 21233)
+++ wp-login.php	(working copy)
@@ -390,7 +390,7 @@
 	}
 
 	// 10 days
-	setcookie( 'wp-postpass_' . COOKIEHASH, $wp_hasher->HashPassword( stripslashes( $_POST['post_password'] ) ), time() + 864000, COOKIEPATH );
+	setcookie( 'wp-postpass_' . COOKIEHASH, $wp_hasher->HashPassword( stripslashes( $_POST['post_password'] ) ), time() + 10 * DAY_IN_SECONDS, COOKIEPATH );
 
 	wp_safe_redirect( wp_get_referer() );
 	exit();
Index: wp-mail.php
===================================================================
--- wp-mail.php	(revision 21233)
+++ wp-mail.php	(working copy)
@@ -30,7 +30,7 @@
 
 set_transient('mailserver_last_checked', true, WP_MAIL_INTERVAL);
 
-$time_difference = get_option('gmt_offset') * 3600;
+$time_difference = get_option('gmt_offset') * HOUR_IN_SECONDS;
 
 $phone_delim = '::';
 
Index: wp-settings.php
===================================================================
--- wp-settings.php	(revision 21233)
+++ wp-settings.php	(working copy)
@@ -23,7 +23,9 @@
 require( ABSPATH . WPINC . '/version.php' );
 
 // Set initial default constants including WP_MEMORY_LIMIT, WP_MAX_MEMORY_LIMIT, WP_DEBUG, WP_CONTENT_DIR and WP_CACHE.
-wp_initial_constants( );
+wp_initial_constants();
+// Define time-related constants.
+wp_time_constants();
 
 // Check for the required PHP version and for the MySQL extension or a database drop-in.
 wp_check_php_mysql_versions();
