get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2102557/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2102557,
    "url": "http://patchwork.ozlabs.org/api/patches/2102557/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20250625132108.3292932-13-jerome.forissier@linaro.org/",
    "project": {
        "id": 18,
        "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api",
        "name": "U-Boot",
        "link_name": "uboot",
        "list_id": "u-boot.lists.denx.de",
        "list_email": "u-boot@lists.denx.de",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20250625132108.3292932-13-jerome.forissier@linaro.org>",
    "list_archive_url": null,
    "date": "2025-06-25T13:19:20",
    "name": "[v4,12/13] doc: add doc/cmd/sntp.rst and remove doc/README.SNTP",
    "commit_ref": "a9675211dd20140a0e0cdd093955136d983502b8",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "ef6b4411cacc0ae403ec5828b1d84c1bf95525dd",
    "submitter": {
        "id": 69192,
        "url": "http://patchwork.ozlabs.org/api/people/69192/?format=api",
        "name": "Jerome Forissier",
        "email": "jerome.forissier@linaro.org"
    },
    "delegate": {
        "id": 157425,
        "url": "http://patchwork.ozlabs.org/api/users/157425/?format=api",
        "username": "jforissier",
        "first_name": "Jerome",
        "last_name": "Forissier",
        "email": "jerome.forissier@linaro.org"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20250625132108.3292932-13-jerome.forissier@linaro.org/mbox/",
    "series": [
        {
            "id": 462405,
            "url": "http://patchwork.ozlabs.org/api/series/462405/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=462405",
            "date": "2025-06-25T13:19:11",
            "name": "sntp for NET_LWIP",
            "version": 4,
            "mbox": "http://patchwork.ozlabs.org/series/462405/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2102557/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2102557/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<u-boot-bounces@lists.denx.de>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256\n header.s=google header.b=P6QDor/1;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=85.214.62.61; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)",
            "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=linaro.org",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de",
            "phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=linaro.org header.i=@linaro.org header.b=\"P6QDor/1\";\n\tdkim-atps=neutral",
            "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=linaro.org",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=jerome.forissier@linaro.org"
        ],
        "Received": [
            "from phobos.denx.de (phobos.denx.de [85.214.62.61])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature ECDSA (secp384r1))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4bS2Z36y5Sz1ydW\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 25 Jun 2025 23:23:07 +1000 (AEST)",
            "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 6503F82E27;\n\tWed, 25 Jun 2025 15:21:49 +0200 (CEST)",
            "by phobos.denx.de (Postfix, from userid 109)\n id 98E2682D83; Wed, 25 Jun 2025 15:21:42 +0200 (CEST)",
            "from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com\n [IPv6:2a00:1450:4864:20::42b])\n (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id D236182E6A\n for <u-boot@lists.denx.de>; Wed, 25 Jun 2025 15:21:39 +0200 (CEST)",
            "by mail-wr1-x42b.google.com with SMTP id\n ffacd0b85a97d-3a531fcaa05so3125056f8f.3\n for <u-boot@lists.denx.de>; Wed, 25 Jun 2025 06:21:39 -0700 (PDT)",
            "from builder.. ([2a01:e0a:3cb:7bb0:af71:dfb2:66ef:80c3])\n by smtp.gmail.com with ESMTPSA id\n ffacd0b85a97d-3a6e8068fd0sm4760042f8f.38.2025.06.25.06.21.38\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 25 Jun 2025 06:21:38 -0700 (PDT)"
        ],
        "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de",
        "X-Spam-Level": "",
        "X-Spam-Status": "No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED,\n SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1750857699; x=1751462499; darn=lists.denx.de;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=JRUZlgyGhWY0+dIXcOcI6HdlzXv35uD5CCmSt0KrIfc=;\n b=P6QDor/1FighJQoJxufX7nO6g3NNsLlQDgXQ9gLQ1z0WsBfxsqPhtVqow1Wj0Frvpw\n BQOrwqE0dU/dnUjfr8Fmp/u527yMEiFbG+17AqqSK4BNEgGH0+11Z4t+5G+YKqG0QmK7\n RzO4js9xSmNzqic3ZGFzknWQ5b1y3PGOvamQjh9aPeuyFjz0oje5x7CYeGjO9evLzFbG\n ZcNq1bc0VW/nBTGK4F9EnUcghc9O/fK1XgsUprzJDA1n3vUnYAL7WLgNOs3yJplE/RwZ\n NE2zSaP3OlPeQaLZ8RSSnxJss1OAApCLq+oFtmH8ivWfHSljhd1ob86M4DkJmA/EuEdP\n osWA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1750857699; x=1751462499;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=JRUZlgyGhWY0+dIXcOcI6HdlzXv35uD5CCmSt0KrIfc=;\n b=bkWNWFAcpT3+5YO8h93b4fqK4ct1nrtvjtLrY79Dkeee+A2kJhzP13/bBhUc9EJX5H\n KPSMH9hWaRLDSl9g7JqWaKbFYyjxEXfRh8efZx9BirtAK3N6xdQUj50EQxF3RJ4ZL81j\n w7zU8GzaKeAmE+ycdDTGrKvSZWaBN/iG6dlI8rHVg8g1XMPvKvwEiqXI8T68VxhiOruU\n muabPIyNHWwVD2JV8w2z9Lnv7t/nVkBALQoI50ox4XEaSaS2pAHDnT8EN38IslY2kKjy\n 7a0KugGKwugsNSMxt8CRrx8fki8Qc15drykmqwUAZg/aWl/HVXSzkOdfwrpCf7M8/ZtV\n +mAg==",
        "X-Gm-Message-State": "AOJu0Yz/2COIntEq3Z1FXByNdtnb57U323Zkf1kcimdDrUZL5LGzFJ3w\n D6Mg5wPTFiPC6WPMrXK+0bgQEtnPBuk1GIq/2qu7SWNRrWM4I3pkVeYBgdh0544s0Mki4esP61V\n yb/s4N7c=",
        "X-Gm-Gg": "ASbGncuErS98YXijxHiJmeLdKLKmsK0D2HGLFksinefYOX/oNP8QIjiNV19YUi60gCr\n ZqaQGw3YW02jN/AkE2UgrmKch2nZ2vjMLIdwWx5xB7oxogQ4i0SnKvSDNYMARcto7lFV2dZRYr6\n FdRGF9J6zZTBa3uncXQVHztyc0Rf9pH+gyXAEjIesRYCB4XAddtwvrekDIXp1SXhO+gVyWZtu3O\n oNXYZo3Q5J60zChaewCmUclBGPigYzUAWycOgh10UdX6wDFdGpjVYHhDo3JvEGjHGXSVCMM6SsC\n 9hGzLYoEvPu8zOKt8/5H6Fq2xh2MN2BrrSvRKSenkKbs7CW9CVim1G/ncAviD0C404Ymu7Y=",
        "X-Google-Smtp-Source": "\n AGHT+IHZZ9i1viqlFzPxDpENkGMy9/CdnFY90yqlCaINn1FnZDsBIoMjf1H8qb1iqsOrS1RqY1ztmA==",
        "X-Received": "by 2002:a05:6000:4614:b0:3a5:276b:1ec0 with SMTP id\n ffacd0b85a97d-3a6ed65b1d4mr2567505f8f.45.1750857698918;\n Wed, 25 Jun 2025 06:21:38 -0700 (PDT)",
        "From": "Jerome Forissier <jerome.forissier@linaro.org>",
        "To": "U-Boot mailing list <u-boot@lists.denx.de>",
        "Cc": "Jerome Forissier <jerome.forissier@linaro.org>,\n Harsha Vardhan V M <h-vm@ti.com>, Heinrich Schuchardt <xypron.glpk@gmx.de>,\n Hou Zhiqiang <Zhiqiang.Hou@nxp.com>, Jonas Karlman <jonas@kwiboo.se>,\n Maxim Moskalets <maximmosk4@gmail.com>, Simon Glass <sjg@chromium.org>,\n Tom Rini <trini@konsulko.com>,\n Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>",
        "Subject": "[PATCH v4 12/13] doc: add doc/cmd/sntp.rst and remove doc/README.SNTP",
        "Date": "Wed, 25 Jun 2025 15:19:20 +0200",
        "Message-ID": "<20250625132108.3292932-13-jerome.forissier@linaro.org>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20250625132108.3292932-1-jerome.forissier@linaro.org>",
        "References": "<20250625132108.3292932-1-jerome.forissier@linaro.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "u-boot@lists.denx.de",
        "X-Mailman-Version": "2.1.39",
        "Precedence": "list",
        "List-Id": "U-Boot discussion <u-boot.lists.denx.de>",
        "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>",
        "List-Archive": "<https://lists.denx.de/pipermail/u-boot/>",
        "List-Post": "<mailto:u-boot@lists.denx.de>",
        "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>",
        "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>",
        "Errors-To": "u-boot-bounces@lists.denx.de",
        "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>",
        "X-Virus-Scanned": "clamav-milter 0.103.8 at phobos.denx.de",
        "X-Virus-Status": "Clean"
    },
    "content": "Add a proper documentation file for the sntp command in RST format and\ndrop doc/README.SNTP. The documentation now includes the NET_LWIP\nspecificities.\n\nSigned-off-by: Jerome Forissier <jerome.forissier@linaro.org>\n---\n\nChanges in v4:\n- Fix typo in commit description and s/wget/sntp/ in the doc file\n\nChanges in v3:\n- Create a new RST file and delete doc/README.SNTP\n\nChanges in v2:\n- New patch\n\n doc/README.SNTP        | 17 ----------\n doc/usage/cmd/sntp.rst | 72 ++++++++++++++++++++++++++++++++++++++++++\n doc/usage/index.rst    |  1 +\n 3 files changed, 73 insertions(+), 17 deletions(-)\n delete mode 100644 doc/README.SNTP\n create mode 100644 doc/usage/cmd/sntp.rst",
    "diff": "diff --git a/doc/README.SNTP b/doc/README.SNTP\ndeleted file mode 100644\nindex da9ec459ad4..00000000000\n--- a/doc/README.SNTP\n+++ /dev/null\n@@ -1,17 +0,0 @@\n-To use SNTP support, add define CONFIG_CMD_SNTP to the\n-configuration file of the board.\n-\n-The \"sntp\" command gets network time from NTP time server and\n-syncronize RTC of the board. This command needs the command line\n-parameter of server's IP address or environment variable\n-\"ntpserverip\". The network time is sent as UTC. So if you want to\n-set local time to RTC, set the offset in second from UTC to the\n-environment variable \"time offset\".\n-\n-If the DHCP server provides time server's IP or time offset, you\n-don't need to set the above environment variables yourself.\n-\n-Current limitations of SNTP support:\n-1. The roundtrip time is ignored.\n-2. Only the 1st NTP server IP, in the option ntp-servers of DHCP, will\n-   be used.\ndiff --git a/doc/usage/cmd/sntp.rst b/doc/usage/cmd/sntp.rst\nnew file mode 100644\nindex 00000000000..d97f83053f7\n--- /dev/null\n+++ b/doc/usage/cmd/sntp.rst\n@@ -0,0 +1,72 @@\n+.. SPDX-License-Identifier: GPL-2.0+:\n+\n+.. index::\n+   single: sntp (command)\n+\n+sntp command\n+============\n+\n+Synopsis\n+--------\n+\n+::\n+\n+    sntp [serverip]\n+    sntp [servername]  # NET_LWIP=y && CMD_DNS=y only\n+\n+\n+Description\n+-----------\n+\n+The sntp command gets the current time from an NTP time server and\n+syncronizes the Real Time Clock (RTC) of the board. This command needs\n+the server's IP address to be given on the command line or via the\n+`ntpserverip` environment variable.\n+\n+The address of the NTP server does not need to be given if the DHCP server\n+provides one. The legacy network stack (`CONFIG_NET=y`) can only use the\n+first NTP server provided in the `ntp-servers` DHCP option.\n+\n+When the network stack is lwIP (`CONFIG_NET_LWIP=y`) and the dns command\n+is enabled (`CONFIG_CMD_DNS=y`), then the sntp command accepts a server\n+name as an argument.\n+\n+The network time is sent as UTC. So, if you want to set the RTC to any local\n+time different from UTC, you need to set the `timeoffset` environment variable.\n+\n+Round-trip delay compensation is not implemented/not enabled. In practice\n+this should not matter much given that the RTC API does not have sub-second\n+resolution, and round-trip times are typically 10 to 100 ms at most.\n+\n+Examples\n+--------\n+\n+::\n+\n+    => setenv ntpserverip 109.190.177.205\n+    => date\n+    Date: 2025-06-16 (Monday)    Time: 15:19:35\n+    => date reset\n+    Reset RTC...\n+    Date: 2000-01-01 (Saturday)    Time:  0:00:00\n+    => date\n+    Date: 2000-01-01 (Saturday)    Time:  0:00:03\n+    => sntp\n+    Date: 2025-06-16 Time: 15:19:43\n+    => date\n+    Date: 2025-06-16 (Monday)    Time: 15:19:47\n+    => setenv timeoffset 7200\n+    => sntp\n+    Date: 2025-06-16 Time: 17:19:55\n+    => date\n+    Date: 2025-06-16 (Monday)    Time: 17:19:57\n+\n+With `CONFIG_NET_LWIP=y` and `CONFIG_CMD_DNS=y`:\n+\n+::\n+\n+    => date reset\n+    Reset RTC...\n+    Date: 2000-01-01 (Saturday)    Time:  0:00:00\n+    => sntp 0.us.pool.ntp.org\n+    Date: 2025-06-16 Time: 15:10:59\ndiff --git a/doc/usage/index.rst b/doc/usage/index.rst\nindex 372ef56c967..1f2de69b953 100644\n--- a/doc/usage/index.rst\n+++ b/doc/usage/index.rst\n@@ -119,6 +119,7 @@ Shell commands\n    cmd/sleep\n    cmd/sm\n    cmd/smbios\n+   cmd/sntp\n    cmd/sound\n    cmd/source\n    cmd/tcpm\n",
    "prefixes": [
        "v4",
        "12/13"
    ]
}