{"id":1143421,"date":"2025-01-08T22:50:04","date_gmt":"2025-01-08T14:50:04","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1143421.html"},"modified":"2025-01-08T22:50:07","modified_gmt":"2025-01-08T14:50:07","slug":"python%e5%a6%82%e4%bd%95%e6%8a%8a%e6%97%b6%e9%97%b4%e5%ad%97%e7%ac%a6%e4%b8%b2%e8%bd%ac%e6%8d%a2%e4%b8%ba%e6%97%b6%e9%97%b4%e6%88%b3-2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1143421.html","title":{"rendered":"Python\u5982\u4f55\u628a\u65f6\u95f4\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u65f6\u95f4\u6233"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24181039\/e8037cc4-bea6-474b-a892-8dcd6afe7cae.webp\" alt=\"Python\u5982\u4f55\u628a\u65f6\u95f4\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u65f6\u95f4\u6233\" \/><\/p>\n<p><p> <strong>Python\u5c06\u65f6\u95f4\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u65f6\u95f4\u6233\u7684\u65b9\u6cd5\u5305\u62ec\uff1a\u4f7f\u7528<code>datetime<\/code>\u6a21\u5757\u3001\u4f7f\u7528<code>time<\/code>\u6a21\u5757\u3001\u4ee5\u53ca\u5904\u7406\u65f6\u533a\u8f6c\u6362\u3002<\/strong> \u5176\u4e2d\uff0c\u6700\u5e38\u7528\u7684\u65b9\u6cd5\u662f\u901a\u8fc7<code>datetime<\/code>\u6a21\u5757\u7684<code>strptime<\/code>\u51fd\u6570\u89e3\u6790\u65f6\u95f4\u5b57\u7b26\u4e32\uff0c\u518d\u901a\u8fc7<code>timestamp<\/code>\u51fd\u6570\u5c06\u5176\u8f6c\u6362\u4e3a\u65f6\u95f4\u6233\u3002<strong><code>strptime<\/code>\u51fd\u6570\u89e3\u6790\u683c\u5f0f\u5316\u7684\u65f6\u95f4\u5b57\u7b26\u4e32\u3001<code>timestamp<\/code>\u51fd\u6570\u5c06<code>datetime<\/code>\u5bf9\u8c61\u8f6c\u6362\u4e3a\u65f6\u95f4\u6233<\/strong>\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u51e0\u79cd\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><h2>\u4e00\u3001\u4f7f\u7528 <code>datetime<\/code> \u6a21\u5757<\/h2>\n<\/p>\n<p><h3>1\u3001\u89e3\u6790\u65f6\u95f4\u5b57\u7b26\u4e32<\/h3>\n<\/p>\n<p><p><code>datetime<\/code> \u6a21\u5757\u4e2d\u7684 <code>strptime<\/code> \u51fd\u6570\u7528\u4e8e\u89e3\u6790\u65f6\u95f4\u5b57\u7b26\u4e32\u3002\u9996\u5148\uff0c\u9700\u8981\u5b9a\u4e49\u65f6\u95f4\u5b57\u7b26\u4e32\u7684\u683c\u5f0f\uff0c\u7136\u540e\u4f7f\u7528 <code>strptime<\/code> \u51fd\u6570\u89e3\u6790\u8be5\u5b57\u7b26\u4e32\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from datetime import datetime<\/p>\n<p>time_string = &quot;2023-10-01 12:34:56&quot;<\/p>\n<p>time_format = &quot;%Y-%m-%d %H:%M:%S&quot;<\/p>\n<p>dt_obj = datetime.strptime(time_string, time_format)<\/p>\n<p>print(dt_obj)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c<code>time_string<\/code> \u662f\u8981\u89e3\u6790\u7684\u65f6\u95f4\u5b57\u7b26\u4e32\uff0c<code>time_format<\/code> \u662f\u8be5\u5b57\u7b26\u4e32\u7684\u683c\u5f0f\uff0c<code>%Y<\/code> \u8868\u793a\u56db\u4f4d\u6570\u7684\u5e74\u4efd\uff0c<code>%m<\/code> \u8868\u793a\u4e24\u4f4d\u6570\u7684\u6708\u4efd\uff0c<code>%d<\/code> \u8868\u793a\u4e24\u4f4d\u6570\u7684\u65e5\u671f\uff0c<code>%H<\/code> \u8868\u793a24\u5c0f\u65f6\u5236\u7684\u5c0f\u65f6\uff0c<code>%M<\/code> \u8868\u793a\u5206\u949f\uff0c<code>%S<\/code> \u8868\u793a\u79d2\u3002<\/p>\n<\/p>\n<p><h3>2\u3001\u5c06 <code>datetime<\/code> \u5bf9\u8c61\u8f6c\u6362\u4e3a\u65f6\u95f4\u6233<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528 <code>datetime<\/code> \u5bf9\u8c61\u7684 <code>timestamp<\/code> \u65b9\u6cd5\u53ef\u4ee5\u5c06\u5176\u8f6c\u6362\u4e3a\u65f6\u95f4\u6233\u3002\u65f6\u95f4\u6233\u662f\u4ece1970\u5e741\u67081\u65e50\u65f60\u52060\u79d2\uff08UTC\uff09\u5230\u67d0\u4e2a\u65f6\u95f4\u70b9\u7684\u79d2\u6570\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">timestamp = dt_obj.timestamp()<\/p>\n<p>print(timestamp)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h2>\u4e8c\u3001\u4f7f\u7528 <code>time<\/code> \u6a21\u5757<\/h2>\n<\/p>\n<p><h3>1\u3001\u89e3\u6790\u65f6\u95f4\u5b57\u7b26\u4e32<\/h3>\n<\/p>\n<p><p><code>time<\/code> \u6a21\u5757\u4e2d\u7684 <code>strptime<\/code> \u51fd\u6570\u540c\u6837\u53ef\u4ee5\u89e3\u6790\u65f6\u95f4\u5b57\u7b26\u4e32\uff0c\u751f\u6210\u4e00\u4e2a\u7ed3\u6784\u5316\u7684\u65f6\u95f4\u5bf9\u8c61\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import time<\/p>\n<p>time_string = &quot;2023-10-01 12:34:56&quot;<\/p>\n<p>time_format = &quot;%Y-%m-%d %H:%M:%S&quot;<\/p>\n<p>struct_time = time.strptime(time_string, time_format)<\/p>\n<p>print(struct_time)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>2\u3001\u5c06\u7ed3\u6784\u5316\u65f6\u95f4\u5bf9\u8c61\u8f6c\u6362\u4e3a\u65f6\u95f4\u6233<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528 <code>time<\/code> \u6a21\u5757\u4e2d\u7684 <code>mktime<\/code> \u51fd\u6570\u5c06\u7ed3\u6784\u5316\u65f6\u95f4\u5bf9\u8c61\u8f6c\u6362\u4e3a\u65f6\u95f4\u6233\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">timestamp = time.mktime(struct_time)<\/p>\n<p>print(timestamp)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h2>\u4e09\u3001\u5904\u7406\u65f6\u533a\u8f6c\u6362<\/h2>\n<\/p>\n<p><h3>1\u3001\u89e3\u6790\u65f6\u95f4\u5b57\u7b26\u4e32\u5e76\u6307\u5b9a\u65f6\u533a<\/h3>\n<\/p>\n<p><p>\u6709\u65f6\u9700\u8981\u5904\u7406\u4e0d\u540c\u7684\u65f6\u533a\uff0c\u53ef\u4ee5\u4f7f\u7528 <code>pytz<\/code> \u6a21\u5757\u6765\u5904\u7406\u65f6\u533a\u4fe1\u606f\u3002\u9996\u5148\uff0c\u5b89\u88c5 <code>pytz<\/code> \u6a21\u5757\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install pytz<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u7136\u540e\uff0c\u53ef\u4ee5\u5728\u89e3\u6790\u65f6\u95f4\u5b57\u7b26\u4e32\u65f6\u6307\u5b9a\u65f6\u533a\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from datetime import datetime<\/p>\n<p>import pytz<\/p>\n<p>time_string = &quot;2023-10-01 12:34:56&quot;<\/p>\n<p>time_format = &quot;%Y-%m-%d %H:%M:%S&quot;<\/p>\n<p>timezone = pytz.timezone(&quot;America\/New_York&quot;)<\/p>\n<p>dt_obj = datetime.strptime(time_string, time_format)<\/p>\n<p>dt_obj = timezone.localize(dt_obj)<\/p>\n<p>print(dt_obj)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>2\u3001\u5c06 <code>datetime<\/code> \u5bf9\u8c61\u8f6c\u6362\u4e3a\u65f6\u95f4\u6233<\/h3>\n<\/p>\n<p><p>\u5904\u7406\u4e86\u65f6\u533a\u4fe1\u606f\u540e\uff0c\u540c\u6837\u53ef\u4ee5\u4f7f\u7528 <code>timestamp<\/code> \u65b9\u6cd5\u5c06\u5176\u8f6c\u6362\u4e3a\u65f6\u95f4\u6233\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">timestamp = dt_obj.timestamp()<\/p>\n<p>print(timestamp)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h2>\u56db\u3001\u793a\u4f8b\u4ee3\u7801\u7efc\u5408\u5e94\u7528<\/h2>\n<\/p>\n<p><p>\u7efc\u5408\u4e0a\u8ff0\u65b9\u6cd5\uff0c\u4ee5\u4e0b\u662f\u5b8c\u6574\u7684\u793a\u4f8b\u4ee3\u7801\uff0c\u5c06\u65f6\u95f4\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u65f6\u95f4\u6233\u5e76\u5904\u7406\u65f6\u533a\u4fe1\u606f\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from datetime import datetime<\/p>\n<p>import pytz<\/p>\n<p>def convert_to_timestamp(time_string, time_format, timezone_str=None):<\/p>\n<p>    if timezone_str:<\/p>\n<p>        timezone = pytz.timezone(timezone_str)<\/p>\n<p>        dt_obj = datetime.strptime(time_string, time_format)<\/p>\n<p>        dt_obj = timezone.localize(dt_obj)<\/p>\n<p>    else:<\/p>\n<p>        dt_obj = datetime.strptime(time_string, time_format)<\/p>\n<p>    return dt_obj.timestamp()<\/p>\n<p>time_string = &quot;2023-10-01 12:34:56&quot;<\/p>\n<p>time_format = &quot;%Y-%m-%d %H:%M:%S&quot;<\/p>\n<p>timezone_str = &quot;America\/New_York&quot;<\/p>\n<p>timestamp = convert_to_timestamp(time_string, time_format, timezone_str)<\/p>\n<p>print(&quot;Timestamp with timezone:&quot;, timestamp)<\/p>\n<p>timestamp = convert_to_timestamp(time_string, time_format)<\/p>\n<p>print(&quot;Timestamp without timezone:&quot;, timestamp)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e0a\u8ff0\u4ee3\u7801\u5b9a\u4e49\u4e86\u4e00\u4e2a <code>convert_to_timestamp<\/code> \u51fd\u6570\uff0c\u8be5\u51fd\u6570\u53ef\u4ee5\u5c06\u65f6\u95f4\u5b57\u7b26\u4e32\u6839\u636e\u6307\u5b9a\u7684\u683c\u5f0f\u548c\u65f6\u533a\u8f6c\u6362\u4e3a\u65f6\u95f4\u6233\u3002\u5982\u679c\u6ca1\u6709\u6307\u5b9a\u65f6\u533a\uff0c\u5219\u9ed8\u8ba4\u4f7f\u7528\u672c\u5730\u65f6\u95f4\u3002<\/p>\n<\/p>\n<p><h2>\u4e94\u3001\u5904\u7406\u5e38\u89c1\u95ee\u9898<\/h2>\n<\/p>\n<p><h3>1\u3001\u65f6\u95f4\u5b57\u7b26\u4e32\u683c\u5f0f\u4e0d\u4e00\u81f4<\/h3>\n<\/p>\n<p><p>\u6709\u65f6\u8f93\u5165\u7684\u65f6\u95f4\u5b57\u7b26\u4e32\u683c\u5f0f\u53ef\u80fd\u4e0d\u4e00\u81f4\uff0c\u9700\u8981\u6839\u636e\u4e0d\u540c\u7684\u683c\u5f0f\u8fdb\u884c\u5904\u7406\u3002\u53ef\u4ee5\u901a\u8fc7\u591a\u4e2a\u683c\u5f0f\u5c1d\u8bd5\u89e3\u6790\u65f6\u95f4\u5b57\u7b26\u4e32\uff0c\u6355\u83b7\u89e3\u6790\u9519\u8bef\u5e76\u8fdb\u884c\u76f8\u5e94\u5904\u7406\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def parse_time_string(time_string):<\/p>\n<p>    formats = [&quot;%Y-%m-%d %H:%M:%S&quot;, &quot;%d-%m-%Y %H:%M:%S&quot;, &quot;%m\/%d\/%Y %H:%M:%S&quot;]<\/p>\n<p>    for fmt in formats:<\/p>\n<p>        try:<\/p>\n<p>            return datetime.strptime(time_string, fmt)<\/p>\n<p>        except ValueError:<\/p>\n<p>            continue<\/p>\n<p>    r<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>se ValueError(&quot;No valid format found for time string: &quot; + time_string)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>2\u3001\u5904\u7406\u590f\u4ee4\u65f6<\/h3>\n<\/p>\n<p><p>\u5728\u5904\u7406\u4e0d\u540c\u7684\u65f6\u533a\u65f6\uff0c\u590f\u4ee4\u65f6\u53ef\u80fd\u4f1a\u5f71\u54cd\u65f6\u95f4\u6233\u7684\u8ba1\u7b97\u3002\u4f7f\u7528 <code>pytz<\/code> \u6a21\u5757\u65f6\uff0c\u53ef\u4ee5\u81ea\u52a8\u5904\u7406\u590f\u4ee4\u65f6\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from datetime import datetime<\/p>\n<p>import pytz<\/p>\n<p>time_string = &quot;2023-07-01 12:34:56&quot;<\/p>\n<p>time_format = &quot;%Y-%m-%d %H:%M:%S&quot;<\/p>\n<p>timezone = pytz.timezone(&quot;America\/New_York&quot;)<\/p>\n<p>dt_obj = datetime.strptime(time_string, time_format)<\/p>\n<p>dt_obj = timezone.localize(dt_obj)<\/p>\n<p>timestamp = dt_obj.timestamp()<\/p>\n<p>print(&quot;Timestamp with DST:&quot;, timestamp)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>3\u3001\u5904\u7406\u4e0eUTC\u7684\u8f6c\u6362<\/h3>\n<\/p>\n<p><p>\u6709\u65f6\u9700\u8981\u5c06\u672c\u5730\u65f6\u95f4\u8f6c\u6362\u4e3aUTC\u65f6\u95f4\u518d\u8ba1\u7b97\u65f6\u95f4\u6233\uff0c\u53ef\u4ee5\u4f7f\u7528 <code>astimezone<\/code> \u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from datetime import datetime<\/p>\n<p>import pytz<\/p>\n<p>time_string = &quot;2023-10-01 12:34:56&quot;<\/p>\n<p>time_format = &quot;%Y-%m-%d %H:%M:%S&quot;<\/p>\n<p>timezone = pytz.timezone(&quot;America\/New_York&quot;)<\/p>\n<p>dt_obj = datetime.strptime(time_string, time_format)<\/p>\n<p>dt_obj = timezone.localize(dt_obj)<\/p>\n<p>utc_dt_obj = dt_obj.astimezone(pytz.utc)<\/p>\n<p>timestamp = utc_dt_obj.timestamp()<\/p>\n<p>print(&quot;Timestamp in UTC:&quot;, timestamp)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u65b9\u6cd5\uff0c\u53ef\u4ee5\u7075\u6d3b\u5730\u5c06\u4e0d\u540c\u683c\u5f0f\u3001\u4e0d\u540c\u65f6\u533a\u7684\u65f6\u95f4\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u65f6\u95f4\u6233\uff0c\u5e76\u5904\u7406\u590f\u4ee4\u65f6\u548cUTC\u8f6c\u6362\u7b49\u95ee\u9898\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u5c06\u65f6\u95f4\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u65f6\u95f4\u6233\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>datetime<\/code>\u6a21\u5757\u6765\u5c06\u65f6\u95f4\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u65f6\u95f4\u6233\u3002\u9996\u5148\uff0c\u60a8\u9700\u8981\u4f7f\u7528<code>strptime()<\/code>\u65b9\u6cd5\u5c06\u65f6\u95f4\u5b57\u7b26\u4e32\u89e3\u6790\u4e3a<code>datetime<\/code>\u5bf9\u8c61\uff0c\u7136\u540e\u53ef\u4ee5\u4f7f\u7528<code>timestamp()<\/code>\u65b9\u6cd5\u5c06\u5176\u8f6c\u6362\u4e3a\u65f6\u95f4\u6233\u3002\u4f8b\u5982\uff1a  <\/p>\n<pre><code class=\"language-python\">from datetime import datetime\n\ntime_string = &quot;2023-10-15 14:30:00&quot;\ndt = datetime.strptime(time_string, &quot;%Y-%m-%d %H:%M:%S&quot;)\ntimestamp = dt.timestamp()\nprint(timestamp)\n<\/code><\/pre>\n<p><strong>Python\u652f\u6301\u54ea\u4e9b\u65f6\u95f4\u5b57\u7b26\u4e32\u683c\u5f0f\u8fdb\u884c\u8f6c\u6362\uff1f<\/strong><br \/>Python\u7684<code>datetime.strptime()<\/code>\u65b9\u6cd5\u652f\u6301\u591a\u79cd\u65f6\u95f4\u5b57\u7b26\u4e32\u683c\u5f0f\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528\u683c\u5f0f\u5316\u4ee3\u7801\u6765\u5b9a\u4e49\u65f6\u95f4\u5b57\u7b26\u4e32\u7684\u7ed3\u6784\uff0c\u4f8b\u5982\uff1a<code>&quot;%Y&quot;<\/code>\u8868\u793a\u5e74\u4efd\uff0c<code>&quot;%m&quot;<\/code>\u8868\u793a\u6708\u4efd\uff0c<code>&quot;%d&quot;<\/code>\u8868\u793a\u65e5\u671f\uff0c<code>&quot;%H&quot;<\/code>\u8868\u793a\u5c0f\u65f6\uff0c<code>&quot;%M&quot;<\/code>\u8868\u793a\u5206\u949f\uff0c<code>&quot;%S&quot;<\/code>\u8868\u793a\u79d2\u3002\u6839\u636e\u60a8\u7684\u9700\u6c42\uff0c\u53ef\u4ee5\u81ea\u5b9a\u4e49\u8fd9\u4e9b\u683c\u5f0f\u6765\u5339\u914d\u60a8\u7684\u65f6\u95f4\u5b57\u7b26\u4e32\u3002<\/p>\n<p><strong>\u5982\u4f55\u5904\u7406\u65f6\u533a\u5bf9\u65f6\u95f4\u6233\u8f6c\u6362\u7684\u5f71\u54cd\uff1f<\/strong><br \/>\u5728\u5904\u7406\u65f6\u95f4\u5b57\u7b26\u4e32\u65f6\uff0c\u65f6\u533a\u53ef\u80fd\u4f1a\u5f71\u54cd\u6700\u7ec8\u7684\u65f6\u95f4\u6233\u7ed3\u679c\u3002\u4f7f\u7528<code>pytz<\/code>\u5e93\u53ef\u4ee5\u5e2e\u52a9\u60a8\u5904\u7406\u65f6\u533a\u3002\u9996\u5148\uff0c\u60a8\u9700\u8981\u5c06\u65f6\u95f4\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a<code>datetime<\/code>\u5bf9\u8c61\uff0c\u5e76\u6307\u5b9a\u5b83\u7684\u65f6\u533a\u3002\u968f\u540e\uff0c\u60a8\u53ef\u4ee5\u5c06\u5176\u8f6c\u6362\u4e3aUTC\u65f6\u95f4\u5e76\u83b7\u53d6\u65f6\u95f4\u6233\u3002\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a  <\/p>\n<pre><code class=\"language-python\">import pytz\nfrom datetime import datetime\n\ntime_string = &quot;2023-10-15 14:30:00&quot;\nlocal_tz = pytz.timezone(&quot;Asia\/Shanghai&quot;)\nlocal_dt = local_tz.localize(datetime.strptime(time_string, &quot;%Y-%m-%d %H:%M:%S&quot;))\ntimestamp = local_dt.timestamp()\nprint(timestamp)\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"Python\u5c06\u65f6\u95f4\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u65f6\u95f4\u6233\u7684\u65b9\u6cd5\u5305\u62ec\uff1a\u4f7f\u7528datetime\u6a21\u5757\u3001\u4f7f\u7528time\u6a21\u5757\u3001\u4ee5\u53ca\u5904\u7406\u65f6\u533a\u8f6c\u6362\u3002 [&hellip;]","protected":false},"author":3,"featured_media":1143426,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1143421"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1143421"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1143421\/revisions"}],"predecessor-version":[{"id":1143430,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1143421\/revisions\/1143430"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1143426"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1143421"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1143421"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1143421"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}