<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: tine</title>
    <description>The latest articles on DEV Community by tine (@caresodev).</description>
    <link>https://dev.to/caresodev</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4061285%2Fa130cc29-fb11-494b-9d82-e524543b59d7.png</url>
      <title>DEV Community: tine</title>
      <link>https://dev.to/caresodev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/caresodev"/>
    <language>en</language>
    <item>
      <title>I ran the same text through two tokenizers. They disagreed by 20%.</title>
      <dc:creator>tine</dc:creator>
      <pubDate>Tue, 18 Aug 2026 10:26:27 +0000</pubDate>
      <link>https://dev.to/caresodev/i-ran-the-same-text-through-two-tokenizers-they-disagreed-by-20-71</link>
      <guid>https://dev.to/caresodev/i-ran-the-same-text-through-two-tokenizers-they-disagreed-by-20-71</guid>
      <description>&lt;h1&gt;
  
  
  SpendGuard 文章 03 — Your cost estimates are 20% off
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;目标平台：dev.to → 拆 5 条 X thread（自动发）&lt;br&gt;
定位：文章 01（定价杠杆）02（账单实测）之后的「测量误差」篇——成本工具的隐性错误&lt;br&gt;
数据：tiktoken 本地实测（同文本 cl100k 2,496 vs o200k 1,949）&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  I ran the same text through two tokenizers. They disagreed by 20%.
&lt;/h2&gt;

&lt;p&gt;Here's a small experiment you can repeat in five minutes. Take one Chinese paragraph, run it through two tokenizers, and compare:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;cl100k_base (the encoder behind GPT-3.5/4-class models): 2,496 tokens&lt;/li&gt;
&lt;li&gt;o200k_base (GPT-4o class): 1,949 tokens&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Same string. Same meaning. 20% apart. Neither is "wrong" — tokenizers are just vocabularies, and different vocabularies cut the same text at different places.&lt;/p&gt;

&lt;p&gt;The problem is what happens when you estimate cost with the wrong one.&lt;/p&gt;

&lt;h3&gt;
  
  
  DeepSeek estimates are structurally off
&lt;/h3&gt;

&lt;p&gt;DeepSeek uses its own vocabulary, and it isn't published the way OpenAI's is. So every cost tool that claims to estimate DeepSeek usage is approximating with a tiktoken encoder that was trained on different data. The error isn't a rounding issue. It's a structural one, in a known direction, and it varies by language: Chinese text gets hit harder than English because the vocab match is worse.&lt;/p&gt;

&lt;p&gt;I've seen dashboards show "estimated tokens" for DeepSeek calls that are off by 20-30%. Nobody flags it. The number just looks authoritative.&lt;/p&gt;

&lt;h3&gt;
  
  
  The fix costs nothing
&lt;/h3&gt;

&lt;p&gt;Every DeepSeek API response contains the real token counts. input_tokens, output_tokens, and for cached calls, the cache hit tokens, all returned in the response object.&lt;/p&gt;

&lt;p&gt;Read them. Stop estimating. If your cost tool shows a number that isn't coming from the actual API response, it's a guess wearing a dashboard.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why this matters more than it sounds
&lt;/h3&gt;

&lt;p&gt;Cost optimization amplifies measurement error. The 30x cache lever I wrote about last week works on cache hit tokens — if your tool miscounts the input side by 20%, your cache hit rate is also wrong by 20%, and every optimization decision you make inherits that error. You can't manage what you're measuring wrong.&lt;/p&gt;

&lt;h3&gt;
  
  
  What this means for your stack
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;If you track LLM costs, log the token fields from responses, not estimates&lt;/li&gt;
&lt;li&gt;If a tool claims DeepSeek support, ask what tokenizer it uses&lt;/li&gt;
&lt;li&gt;For Chinese-heavy workloads, distrust any estimate more than usual&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That last point is why SpendGuard reads real response counts instead of estimating: cache hit rate as a first-class metric, per-model and per-project breakdowns, and no guesswork in the numbers. Open source, local-first: github.com/caresotin/spendguard.&lt;/p&gt;

&lt;p&gt;Check your own numbers this week. If your cost tool can't show you where they come from, that's your answer.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>deepseek</category>
      <category>cost</category>
    </item>
    <item>
      <title>I watched my LLM bill for 30 days. The 30x cache lever is real.</title>
      <dc:creator>tine</dc:creator>
      <pubDate>Tue, 18 Aug 2026 08:14:31 +0000</pubDate>
      <link>https://dev.to/caresodev/i-watched-my-llm-bill-for-30-days-the-30x-cache-lever-is-real-2hp9</link>
      <guid>https://dev.to/caresodev/i-watched-my-llm-bill-for-30-days-the-30x-cache-lever-is-real-2hp9</guid>
      <description>&lt;h1&gt;
  
  
  SpendGuard 文章 02 — I watched my LLM bill for 30 days
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;目标平台：dev.to → 拆 5 条 X thread（自动发）&lt;br&gt;
定位：文章 01（30× cache 杠杆）的「实测证据篇」——个人实测 + 诚实结论&lt;br&gt;
风格：去 AI 味（少破折号、少对称排比、真人口气、具体数字）&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  I watched my LLM bill for 30 days. The 30x cache lever is real.
&lt;/h2&gt;

&lt;p&gt;Last week I wrote about DeepSeek V4's pricing mechanic that nobody talks about: cached input tokens cost $0.007 per million, uncached cost $0.22. Same tokens, 31x apart. A few people asked the obvious follow-up: "okay, but does it actually matter in practice?"&lt;/p&gt;

&lt;p&gt;So I did the boring thing. I logged my own LLM usage for 30 days. Every session, every cron job, every API call. Here's what the numbers said.&lt;/p&gt;

&lt;h3&gt;
  
  
  The bill is tiny. That's the point.
&lt;/h3&gt;

&lt;p&gt;My total spend: about $0.90 a month. Ten sessions a day, twenty agent steps each, DeepSeek flash off-peak. At that scale, nobody needs a cost tool. If your monthly bill is under $10, the best cost optimization is to stop thinking about it.&lt;/p&gt;

&lt;p&gt;The interesting part is what the breakdown looked like, because that's where the levers show up.&lt;/p&gt;

&lt;h3&gt;
  
  
  One pattern ate 80% of the cost
&lt;/h3&gt;

&lt;p&gt;My agent sessions resend the whole conversation history on every step. A 20-step session with a 10K-token history pays for that history 20 times. That's ~10.5K input tokens per step on average, and whether those tokens hit cache decides the bill:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;cache hit: $0.007/M -&amp;gt; a 100K-token context costs about $0.004&lt;/li&gt;
&lt;li&gt;cache miss: $0.22/M -&amp;gt; the same context costs $0.025&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Six times more. On a 50-calls-a-day RAG workload, that difference is the difference between $6/month and $38/month. The cache hit rate is not a technical detail. It's the whole bill.&lt;/p&gt;

&lt;p&gt;What kills cache hits: anything that changes the prompt prefix. A timestamp in the system prompt, a reordered tool list, an auto-updating "today is" line. One moving byte invalidates the entire prefix cache.&lt;/p&gt;

&lt;h3&gt;
  
  
  My tokenizer measurements were off by 20%
&lt;/h3&gt;

&lt;p&gt;I took the same Chinese text and ran it through two tokenizers. One counted 2,496 tokens. The other counted 1,949. Same string, 20% apart. DeepSeek uses its own vocabulary, so anything you estimate with tiktoken is an approximation with a known error direction.&lt;/p&gt;

&lt;p&gt;The fix is free: if you're reading real API responses, the exact token counts are in the response. Use them. Stop estimating.&lt;/p&gt;

&lt;h3&gt;
  
  
  Peak pricing doubles silently
&lt;/h3&gt;

&lt;p&gt;Off-peak vs peak is a 2x multiplier on everything. I moved my cron jobs to off-peak hours and the batch bill halved. It's one config change.&lt;/p&gt;

&lt;h3&gt;
  
  
  What I actually changed
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;System prompt is now frozen. No timestamps, no dynamic parts. One moving byte in the prefix invalidates the whole cache, and it's the cheapest fix I found.&lt;/li&gt;
&lt;li&gt;Cron jobs run off-peak. Same work, half the price.&lt;/li&gt;
&lt;li&gt;Retries capped at 2 with backoff. A retry storm triples the bill and almost never fixes the prompt that caused it.&lt;/li&gt;
&lt;li&gt;I stopped estimating tokens. Every aggregator reads the real counts from API responses.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  The honest conclusion
&lt;/h3&gt;

&lt;p&gt;Individuals don't need a cost tool. Teams running production workloads with five-figure bills do. If your bill is that big, the cache hit rate is your first audit point, and most dashboards don't even show it. That gap is why I'm building SpendGuard: cache hit rate as a first-class metric, pricing checked against the official page, per-model and per-project breakdowns. Open source, local-first: github.com/caresotin/spendguard.&lt;/p&gt;

&lt;p&gt;Your first move costs nothing: check your cache hit rate this week. If you can't see it, that's your answer.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>deepseek</category>
      <category>cost</category>
    </item>
    <item>
      <title>DeepSeek V4 pricing: the 30x cache lever your cost tool isn't showing you</title>
      <dc:creator>tine</dc:creator>
      <pubDate>Tue, 18 Aug 2026 03:28:22 +0000</pubDate>
      <link>https://dev.to/caresodev/deepseek-v4-pricing-the-30x-cache-lever-your-cost-tool-isnt-showing-you-1lg7</link>
      <guid>https://dev.to/caresodev/deepseek-v4-pricing-the-30x-cache-lever-your-cost-tool-isnt-showing-you-1lg7</guid>
      <description>&lt;h1&gt;
  
  
  DeepSeek V4 pricing: the 30x cache lever your cost tool isn't showing you
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;内容管线 #1 ｜ 母题：热点/避坑（DeepSeek V4 定价）｜ 目标平台：dev.to（caresodev）→ 后续 X/HN 分发&lt;br&gt;
SEO 关键词：deepseek v4 pricing, deepseek cache pricing, llm cost, deepseek tokenizer&lt;br&gt;
CTA：SpendGuard 预登记（落地页部署后换链接；当前引 GitHub 仓库）&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;When DeepSeek shipped V4 pricing, one number got almost no attention. Input tokens with a cache hit cost &lt;strong&gt;$0.007 per million&lt;/strong&gt;. Without a cache hit, the same input costs &lt;strong&gt;$0.22 per million&lt;/strong&gt;. That's a 31x difference on the same tokens.&lt;/p&gt;

&lt;p&gt;If you run agent loops, cron jobs, or anything with a repeating prompt against DeepSeek, this single mechanic decides whether your monthly bill is a rounding error or a surprise.&lt;/p&gt;

&lt;h2&gt;
  
  
  The actual V4 prices
&lt;/h2&gt;

&lt;p&gt;Verified from the official pricing page (2026-08):&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;1M tokens, USD&lt;/th&gt;
&lt;th&gt;deepseek-v4-flash&lt;/th&gt;
&lt;th&gt;deepseek-v4-pro&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Input, cache hit&lt;/td&gt;
&lt;td&gt;$0.007&lt;/td&gt;
&lt;td&gt;$0.022&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Input, cache miss&lt;/td&gt;
&lt;td&gt;$0.22&lt;/td&gt;
&lt;td&gt;$0.66&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Output&lt;/td&gt;
&lt;td&gt;$0.66&lt;/td&gt;
&lt;td&gt;$1.98&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;All prices double during peak hours. Output is the most expensive line item on every row.&lt;/p&gt;

&lt;h2&gt;
  
  
  What cache pricing means in practice
&lt;/h2&gt;

&lt;p&gt;Every API call has a prefix. Same prefix, same order, and the provider can serve most of it from cache. Three patterns dominate real bills:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Agent loops.&lt;/strong&gt; Every step resends the whole conversation. A 20-step session with a 10K-token history pays for that 10K prefix 20 times. Cache hit makes each resend cost $0.007/M instead of $0.22/M. No cache, and the same session costs 31x more for the input portion.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cron and batch jobs.&lt;/strong&gt; Deterministic prompts with a stable system prompt are the easiest cache wins in existence.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;RAG with a fixed system prompt.&lt;/strong&gt; The retrieved chunks change, but the instructions don't. A stable instruction prefix keeps the cache alive.&lt;/p&gt;

&lt;p&gt;The catch: any change to the prefix kills the cache for the whole request. A timestamp injected into the system prompt, a reordered context block, even a trailing newline in the wrong place. Cache is fragile by design, and it's invisible unless you measure it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why generic cost tools get DeepSeek wrong
&lt;/h2&gt;

&lt;p&gt;Two structural problems, both measurable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pricing tables updated by community PRs.&lt;/strong&gt; LiteLLM and similar tools track prices from community submissions. When DeepSeek changes pricing, there's a window between the change and the merged PR where every estimate is wrong. V4's cache-hit tier is exactly the kind of change that breaks old estimates, and it's the tier that matters most.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tokenizer mismatch.&lt;/strong&gt; Most tools estimate tokens with OpenAI's tiktoken. DeepSeek ships its own tokenizer. I measured the same Chinese text with both: cl100k_base counts 2,496 tokens, o200k_base counts 1,949. That's a 20% spread on the same string. Estimate a bill with the wrong tokenizer and the numbers are fiction.&lt;/p&gt;

&lt;h2&gt;
  
  
  What actually cuts a DeepSeek bill
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Keep prefixes stable.&lt;/strong&gt; Same system prompt, same ordering, no timestamps. Cache hit rate is the single biggest lever on the bill.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run batch jobs off-peak.&lt;/strong&gt; Prices double in peak hours. Nightly processing at 3am is half price for the same work.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cap retries.&lt;/strong&gt; A retry storm multiplies the bill 3x and produces nothing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Watch output.&lt;/strong&gt; Output tokens are the most expensive row on the table. Long generations are the real spend.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Real numbers from my own usage
&lt;/h2&gt;

&lt;p&gt;A simple Q&amp;amp;A (2K input + 1K output) costs &lt;strong&gt;$0.0011&lt;/strong&gt;. A 100K-token context call costs &lt;strong&gt;$0.0253&lt;/strong&gt;, or &lt;strong&gt;$0.0040&lt;/strong&gt; if the prefix caches (84% off). Individual requests are cheap. Bills explode from repetition: agent loops, cron, retries, context you keep resending. None of it shows up in a per-request view.&lt;/p&gt;

&lt;h2&gt;
  
  
  The gap
&lt;/h2&gt;

&lt;p&gt;The popular observability tools show total spend. Almost none show cache hit rate as a first-class metric, and that's the number that actually determines DeepSeek cost. I'm building &lt;a href="https://github.com/caresotin/spendguard" rel="noopener noreferrer"&gt;SpendGuard&lt;/a&gt; to fix exactly this: pricing checked against the official page instead of community PRs, cache hit rate visibility, off-peak scheduling suggestions, and cost reports that don't need a spreadsheet. Pre-registration opens soon, watch the repo to get notified.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Data verified against api-docs.deepseek.com pricing page, 2026-08-18. Prices change; check the official page before making decisions.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>deepseek</category>
      <category>productivity</category>
    </item>
    <item>
      <title>I built a local CLI to audit my LLM bill, and it caught a 6.9% overcharge</title>
      <dc:creator>tine</dc:creator>
      <pubDate>Sun, 16 Aug 2026 14:33:34 +0000</pubDate>
      <link>https://dev.to/caresodev/i-built-a-local-cli-to-audit-my-llm-bill-and-it-caught-a-69-overcharge-13g8</link>
      <guid>https://dev.to/caresodev/i-built-a-local-cli-to-audit-my-llm-bill-and-it-caught-a-69-overcharge-13g8</guid>
      <description>&lt;p&gt;Last month my OpenAI bill didn't match my own logs. Cached tokens were being&lt;br&gt;
billed at the full uncached rate. 6.9% over a month. The observability tools I&lt;br&gt;
pay for showed me what I spent, but not what I was overcharged.&lt;/p&gt;

&lt;p&gt;So I built SpendGuard, a local-first CLI for LLM cost. It runs entirely on your&lt;br&gt;
machine.&lt;/p&gt;

&lt;p&gt;What it does:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;generates independent receipts (versioned pricing, cache hit/miss dual
pricing) and checks them against your provider invoice&lt;/li&gt;
&lt;li&gt;runs as a local proxy with a hard budget cutoff (returns 429 instead of
letting the bill climb)&lt;/li&gt;
&lt;li&gt;suggests cheaper models and more caching, which cut my test case about 79%&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Why local-first: your API keys and call data never leave your machine. You can&lt;br&gt;
read the code, and the code checks your bill. No accounts, no telemetry.&lt;/p&gt;

&lt;p&gt;Try it:&lt;/p&gt;

&lt;p&gt;pip install spendguard&lt;br&gt;
spendguard audit your-bill.csv&lt;/p&gt;

&lt;p&gt;Plain Python, no dependencies (tiktoken is optional). MIT, 13 unit tests, CI on&lt;br&gt;
GitHub Actions.&lt;/p&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/caresotin/spendguard" rel="noopener noreferrer"&gt;https://github.com/caresotin/spendguard&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'm sure there are edge cases I've missed (retries, streaming, batch calls). If&lt;br&gt;
you use the OpenAI or Anthropic API, I'd like to know what breaks.&lt;/p&gt;

&lt;p&gt;opensource, ai, python, productivity&lt;/p&gt;

</description>
      <category>cli</category>
      <category>llm</category>
      <category>openai</category>
      <category>software</category>
    </item>
    <item>
      <title>Building a Zero-Dependency MCP Server for the Timestamp Bugs LLMs Get Wrong</title>
      <dc:creator>tine</dc:creator>
      <pubDate>Sat, 08 Aug 2026 12:26:49 +0000</pubDate>
      <link>https://dev.to/caresodev/building-a-zero-dependency-mcp-server-for-the-timestamp-bugs-llms-get-wrong-3jo2</link>
      <guid>https://dev.to/caresodev/building-a-zero-dependency-mcp-server-for-the-timestamp-bugs-llms-get-wrong-3jo2</guid>
      <description>&lt;h1&gt;
  
  
  Building a Zero-Dependency MCP Server for the Timestamp Bugs LLMs Get Wrong
&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;This is a build log for &lt;code&gt;tsforge-mcp&lt;/code&gt; — a pure Node.js MCP server with 16 timestamp/date tools. No npm dependencies, dual transport (stdio + Streamable HTTP). Repo: &lt;a href="https://github.com/caresotin/tsforge-mcp" rel="noopener noreferrer"&gt;https://github.com/caresotin/tsforge-mcp&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;Most MCP time servers give you &lt;code&gt;get_current_time&lt;/code&gt; and &lt;code&gt;convert_time&lt;/code&gt;. Fine — but those are also the two things you can just ask the model directly. The real failures show up at the &lt;em&gt;edges&lt;/em&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cron next fire&lt;/strong&gt;: &lt;code&gt;0 0 29 2 *&lt;/code&gt; (Feb 29) must skip to 2028, not "next year".&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Excel serial 60&lt;/strong&gt;: &lt;code&gt;60&lt;/code&gt; decodes to &lt;code&gt;1900-02-29&lt;/code&gt; — a date that never existed (the famous 1900 leap-year bug).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ISO-8601 week&lt;/strong&gt;: &lt;code&gt;2016-01-01&lt;/code&gt; is week 53 of &lt;strong&gt;2015&lt;/strong&gt;, not week 1.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DST-aware tz&lt;/strong&gt;: &lt;code&gt;Asia/Shanghai → America/New_York&lt;/code&gt; is not a fixed offset.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SQL dialects&lt;/strong&gt;: &lt;code&gt;UNIX_TIMESTAMP()&lt;/code&gt; vs &lt;code&gt;TO_TIMESTAMP()&lt;/code&gt; vs &lt;code&gt;strftime()&lt;/code&gt; vs &lt;code&gt;DATEADD&lt;/code&gt; — all different.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every one of those, asked of a frontier model, returns a confident wrong answer. So I extracted boundary-correct algorithms into tools.&lt;/p&gt;

&lt;h2&gt;
  
  
  Architecture (no dependencies)
&lt;/h2&gt;

&lt;p&gt;One codebase, two transports:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;stdio&lt;/strong&gt; for Claude Desktop / local MCP clients.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Streamable HTTP&lt;/strong&gt; for ChatGPT Apps SDK / remote clients.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Everything is Node.js built-ins: JSON-RPC 2.0 framing, HTTP session management, and the algorithms in a single module.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// cron_next: handle the 29 Feb edge case&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;cronNext&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;expr&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;n&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;sched&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;parseCron&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;expr&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;out&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;cur&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="k"&gt;while &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;out&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;n&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;cur&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;nextMatch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;sched&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;cur&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;cur&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nx"&gt;out&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;cur&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;cur&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;cur&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getTime&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;out&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Excel bug is just a constant offset with a conditional:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;excelSerialToDate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;s&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Excel wrongly treats 1900 as a leap year; serial 60 = fake Feb 29&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;base&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;UTC&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1899&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;11&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;d&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;base&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getTime&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;s&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;s&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;86400000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;d&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Why this helps the web side
&lt;/h2&gt;

&lt;p&gt;The same engine powers a free converter at &lt;strong&gt;&lt;a href="https://gotimestamp.com/sql-timestamp-converter.html" rel="noopener noreferrer"&gt;https://gotimestamp.com/sql-timestamp-converter.html&lt;/a&gt;&lt;/strong&gt;, and we documented the per-dialect gotchas as language guides:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;MySQL: &lt;a href="https://gotimestamp.com/timestamp/mysql" rel="noopener noreferrer"&gt;https://gotimestamp.com/timestamp/mysql&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;PostgreSQL: &lt;a href="https://gotimestamp.com/timestamp/postgresql" rel="noopener noreferrer"&gt;https://gotimestamp.com/timestamp/postgresql&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;SQLite: &lt;a href="https://gotimestamp.com/timestamp/sqlite" rel="noopener noreferrer"&gt;https://gotimestamp.com/timestamp/sqlite&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Node.js: &lt;a href="https://gotimestamp.com/timestamp/nodejs" rel="noopener noreferrer"&gt;https://gotimestamp.com/timestamp/nodejs&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you're shipping MCP servers, what edge cases have you had to hand-code? Curious whether others hit the same date/time boundary traps.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Repo:&lt;/strong&gt; &lt;a href="https://github.com/caresotin/tsforge-mcp" rel="noopener noreferrer"&gt;https://github.com/caresotin/tsforge-mcp&lt;/a&gt;&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>node</category>
      <category>ai</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>前端用 Intl 展示时间戳，ISO8601 规范化，附速查页</title>
      <dc:creator>tine</dc:creator>
      <pubDate>Mon, 03 Aug 2026 20:38:29 +0000</pubDate>
      <link>https://dev.to/caresodev/qian-duan-yong-intl-zhan-shi-shi-jian-chuo-iso8601-gui-fan-hua-fu-su-cha-ye-5e4c</link>
      <guid>https://dev.to/caresodev/qian-duan-yong-intl-zhan-shi-shi-jian-chuo-iso8601-gui-fan-hua-fu-su-cha-ye-5e4c</guid>
      <description>&lt;h1&gt;
  
  
  前端用 Intl 展示时间戳，ISO8601 规范化，附速查页
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;作者是 前端 / Intl / ISO8601 方向的开发者。这篇不是广告，是踩坑记录 + 顺手做的工具。&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  背景
&lt;/h2&gt;

&lt;p&gt;做 前端 / Intl / ISO8601 时，时间戳转换是最常被低估的雷区。16 个时间戳工具(Unix 转换/时区/ISO8601/Cron/Duration…) 已覆盖日常；但每个语言/框架的坑都不一样，所以又补了 30 个语言/框架时间戳页(python/javascript/java/sql/…)，每页含 6 个真实坑。&lt;/p&gt;

&lt;h2&gt;
  
  
  我踩过的坑（举几个）
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;秒 vs 毫秒：前端 &lt;code&gt;Date.now()&lt;/code&gt; 是毫秒，后端常存秒，混用差 1000 倍。&lt;/li&gt;
&lt;li&gt;时区不是字符串：存 UTC、展示本地，别把本地时间当 UTC 落库。&lt;/li&gt;
&lt;li&gt;2038 问题：32 位系统 &lt;code&gt;time_t&lt;/code&gt; 在 2038-01-19 溢出，老系统要提前查。&lt;/li&gt;
&lt;li&gt;夏令时：一年有两次重复/缺失的本地时间，跨区调度尤其坑。&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  我顺手做的东西
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;转换速查页：&lt;a href="https://gotimestamp.com/timestamp/typescript" rel="noopener noreferrer"&gt;https://gotimestamp.com/timestamp/typescript&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;相关语言页：&lt;a href="https://gotimestamp.com/timestamp/go" rel="noopener noreferrer"&gt;https://gotimestamp.com/timestamp/go&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;开源 MCP：&lt;a href="https://github.com/caresotin/tsforge-mcp" rel="noopener noreferrer"&gt;https://github.com/caresotin/tsforge-mcp&lt;/a&gt; —— 把时间戳转换/校验直接接进 LLM 工作流，不用手算。&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  小结
&lt;/h2&gt;

&lt;p&gt;时间戳没那么简单，但工具到位就省心。上面都是免费、开源、可直接用的，希望对同样踩坑的人有帮助。&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>frontend</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>100 城时区页给跨区调度当速查，DST 自动算</title>
      <dc:creator>tine</dc:creator>
      <pubDate>Mon, 03 Aug 2026 20:33:10 +0000</pubDate>
      <link>https://dev.to/caresodev/100-cheng-shi-qu-ye-gei-kua-qu-diao-du-dang-su-cha-dst-zi-dong-suan-33p7</link>
      <guid>https://dev.to/caresodev/100-cheng-shi-qu-ye-gei-kua-qu-diao-du-dang-su-cha-dst-zi-dong-suan-33p7</guid>
      <description>&lt;h1&gt;
  
  
  100 城时区页给跨区调度当速查，DST 自动算
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;作者是 数据管道 / 跨时区调度 方向的开发者。这篇不是广告，是踩坑记录 + 顺手做的工具。&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  背景
&lt;/h2&gt;

&lt;p&gt;做 数据管道 / 跨时区调度 时，时间戳转换是最常被低估的雷区。16 个时间戳工具(Unix 转换/时区/ISO8601/Cron/Duration…) 已覆盖日常；但每个语言/框架的坑都不一样，所以又补了 30 个语言/框架时间戳页(python/javascript/java/sql/…)，每页含 6 个真实坑。&lt;/p&gt;

&lt;h2&gt;
  
  
  我踩过的坑（举几个）
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;秒 vs 毫秒：前端 &lt;code&gt;Date.now()&lt;/code&gt; 是毫秒，后端常存秒，混用差 1000 倍。&lt;/li&gt;
&lt;li&gt;时区不是字符串：存 UTC、展示本地，别把本地时间当 UTC 落库。&lt;/li&gt;
&lt;li&gt;2038 问题：32 位系统 &lt;code&gt;time_t&lt;/code&gt; 在 2038-01-19 溢出，老系统要提前查。&lt;/li&gt;
&lt;li&gt;夏令时：一年有两次重复/缺失的本地时间，跨区调度尤其坑。&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  我顺手做的东西
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;转换速查页：&lt;a href="https://gotimestamp.com/timezone/new-york" rel="noopener noreferrer"&gt;https://gotimestamp.com/timezone/new-york&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;相关语言页：&lt;a href="https://gotimestamp.com/timezone/london" rel="noopener noreferrer"&gt;https://gotimestamp.com/timezone/london&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;开源 MCP：&lt;a href="https://github.com/caresotin/tsforge-mcp" rel="noopener noreferrer"&gt;https://github.com/caresotin/tsforge-mcp&lt;/a&gt; —— 把时间戳转换/校验直接接进 LLM 工作流，不用手算。&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  小结
&lt;/h2&gt;

&lt;p&gt;时间戳没那么简单，但工具到位就省心。上面都是免费、开源、可直接用的，希望对同样踩坑的人有帮助。&lt;/p&gt;

</description>
      <category>dataengineering</category>
      <category>database</category>
      <category>python</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Node Date 的 epoch 毫秒坑 + 用 MCP 把转换塞进 AI 流</title>
      <dc:creator>tine</dc:creator>
      <pubDate>Mon, 03 Aug 2026 20:33:09 +0000</pubDate>
      <link>https://dev.to/caresodev/node-date-de-epoch-hao-miao-keng-yong-mcp-ba-zhuan-huan-sai-jin-ai-liu-1ppe</link>
      <guid>https://dev.to/caresodev/node-date-de-epoch-hao-miao-keng-yong-mcp-ba-zhuan-huan-sai-jin-ai-liu-1ppe</guid>
      <description>&lt;h1&gt;
  
  
  Node Date 的 epoch 毫秒坑 + 用 MCP 把转换塞进 AI 流
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;作者是 Node.js / JS 时间 方向的开发者。这篇不是广告，是踩坑记录 + 顺手做的工具。&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  背景
&lt;/h2&gt;

&lt;p&gt;做 Node.js / JS 时间 时，时间戳转换是最常被低估的雷区。16 个时间戳工具(Unix 转换/时区/ISO8601/Cron/Duration…) 已覆盖日常；但每个语言/框架的坑都不一样，所以又补了 30 个语言/框架时间戳页(python/javascript/java/sql/…)，每页含 6 个真实坑。&lt;/p&gt;

&lt;h2&gt;
  
  
  我踩过的坑（举几个）
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;秒 vs 毫秒：前端 &lt;code&gt;Date.now()&lt;/code&gt; 是毫秒，后端常存秒，混用差 1000 倍。&lt;/li&gt;
&lt;li&gt;时区不是字符串：存 UTC、展示本地，别把本地时间当 UTC 落库。&lt;/li&gt;
&lt;li&gt;2038 问题：32 位系统 &lt;code&gt;time_t&lt;/code&gt; 在 2038-01-19 溢出，老系统要提前查。&lt;/li&gt;
&lt;li&gt;夏令时：一年有两次重复/缺失的本地时间，跨区调度尤其坑。&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  我顺手做的东西
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;转换速查页：&lt;a href="https://gotimestamp.com/timestamp/nodejs" rel="noopener noreferrer"&gt;https://gotimestamp.com/timestamp/nodejs&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;相关语言页：&lt;a href="https://gotimestamp.com/timestamp/javascript" rel="noopener noreferrer"&gt;https://gotimestamp.com/timestamp/javascript&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;开源 MCP：&lt;a href="https://github.com/caresotin/tsforge-mcp" rel="noopener noreferrer"&gt;https://github.com/caresotin/tsforge-mcp&lt;/a&gt; —— 把时间戳转换/校验直接接进 LLM 工作流，不用手算。&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  小结
&lt;/h2&gt;

&lt;p&gt;时间戳没那么简单，但工具到位就省心。上面都是免费、开源、可直接用的，希望对同样踩坑的人有帮助。&lt;/p&gt;

</description>
      <category>node</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>SQL 里时间戳的 4 个真坑 + 用 tsforge-mcp 在 LLM 里直接算</title>
      <dc:creator>tine</dc:creator>
      <pubDate>Mon, 03 Aug 2026 20:26:07 +0000</pubDate>
      <link>https://dev.to/caresodev/sql-li-shi-jian-chuo-de-4-ge-zhen-keng-yong-tsforge-mcp-zai-llm-li-zhi-jie-suan-4hna</link>
      <guid>https://dev.to/caresodev/sql-li-shi-jian-chuo-de-4-ge-zhen-keng-yong-tsforge-mcp-zai-llm-li-zhi-jie-suan-4hna</guid>
      <description>&lt;h1&gt;
  
  
  SQL 里时间戳的 4 个真坑 + 用 tsforge-mcp 在 LLM 里直接算
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;作者是 DBA / SQL 时间函数 方向的开发者。这篇不是广告，是踩坑记录 + 顺手做的工具。&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  背景
&lt;/h2&gt;

&lt;p&gt;做 DBA / SQL 时间函数 时，时间戳转换是最常被低估的雷区。16 个时间戳工具(Unix 转换/时区/ISO8601/Cron/Duration…) 已覆盖日常；但每个语言/框架的坑都不一样，所以又补了 30 个语言/框架时间戳页(python/javascript/java/sql/…)，每页含 6 个真实坑。&lt;/p&gt;

&lt;h2&gt;
  
  
  我踩过的坑（举几个）
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;秒 vs 毫秒：前端 &lt;code&gt;Date.now()&lt;/code&gt; 是毫秒，后端常存秒，混用差 1000 倍。&lt;/li&gt;
&lt;li&gt;时区不是字符串：存 UTC、展示本地，别把本地时间当 UTC 落库。&lt;/li&gt;
&lt;li&gt;2038 问题：32 位系统 &lt;code&gt;time_t&lt;/code&gt; 在 2038-01-19 溢出，老系统要提前查。&lt;/li&gt;
&lt;li&gt;夏令时：一年有两次重复/缺失的本地时间，跨区调度尤其坑。&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  我顺手做的东西
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;转换速查页：&lt;a href="https://gotimestamp.com/timestamp/mysql" rel="noopener noreferrer"&gt;https://gotimestamp.com/timestamp/mysql&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;相关语言页：&lt;a href="https://gotimestamp.com/timestamp/postgresql" rel="noopener noreferrer"&gt;https://gotimestamp.com/timestamp/postgresql&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;开源 MCP：&lt;a href="https://github.com/caresotin/tsforge-mcp" rel="noopener noreferrer"&gt;https://github.com/caresotin/tsforge-mcp&lt;/a&gt; —— 把时间戳转换/校验直接接进 LLM 工作流，不用手算。&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  小结
&lt;/h2&gt;

&lt;p&gt;时间戳没那么简单，但工具到位就省心。上面都是免费、开源、可直接用的，希望对同样踩坑的人有帮助。&lt;/p&gt;

</description>
      <category>sql</category>
      <category>database</category>
      <category>mysql</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>写 Python 时被 datetime 时区坑过，顺手做了转换页 + 开源 MCP</title>
      <dc:creator>tine</dc:creator>
      <pubDate>Mon, 03 Aug 2026 20:26:05 +0000</pubDate>
      <link>https://dev.to/caresodev/xie-python-shi-bei-datetime-shi-qu-keng-guo-shun-shou-zuo-liao-zhuan-huan-ye-kai-yuan-mcp-31e</link>
      <guid>https://dev.to/caresodev/xie-python-shi-bei-datetime-shi-qu-keng-guo-shun-shou-zuo-liao-zhuan-huan-ye-kai-yuan-mcp-31e</guid>
      <description>&lt;h1&gt;
  
  
  写 Python 时被 datetime 时区坑过，顺手做了转换页 + 开源 MCP
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;作者是 Python 后端 / datetime 时区坑 方向的开发者。这篇不是广告，是踩坑记录 + 顺手做的工具。&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  背景
&lt;/h2&gt;

&lt;p&gt;做 Python 后端 / datetime 时区坑 时，时间戳转换是最常被低估的雷区。16 个时间戳工具(Unix 转换/时区/ISO8601/Cron/Duration…) 已覆盖日常；但每个语言/框架的坑都不一样，所以又补了 30 个语言/框架时间戳页(python/javascript/java/sql/…)，每页含 6 个真实坑。&lt;/p&gt;

&lt;h2&gt;
  
  
  我踩过的坑（举几个）
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;秒 vs 毫秒：前端 &lt;code&gt;Date.now()&lt;/code&gt; 是毫秒，后端常存秒，混用差 1000 倍。&lt;/li&gt;
&lt;li&gt;时区不是字符串：存 UTC、展示本地，别把本地时间当 UTC 落库。&lt;/li&gt;
&lt;li&gt;2038 问题：32 位系统 &lt;code&gt;time_t&lt;/code&gt; 在 2038-01-19 溢出，老系统要提前查。&lt;/li&gt;
&lt;li&gt;夏令时：一年有两次重复/缺失的本地时间，跨区调度尤其坑。&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  我顺手做的东西
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;转换速查页：&lt;a href="https://gotimestamp.com/timestamp/python" rel="noopener noreferrer"&gt;https://gotimestamp.com/timestamp/python&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;相关语言页：&lt;a href="https://gotimestamp.com/timestamp/mysql" rel="noopener noreferrer"&gt;https://gotimestamp.com/timestamp/mysql&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;开源 MCP：&lt;a href="https://github.com/caresotin/tsforge-mcp" rel="noopener noreferrer"&gt;https://github.com/caresotin/tsforge-mcp&lt;/a&gt; —— 把时间戳转换/校验直接接进 LLM 工作流，不用手算。&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  小结
&lt;/h2&gt;

&lt;p&gt;时间戳没那么简单，但工具到位就省心。上面都是免费、开源、可直接用的，希望对同样踩坑的人有帮助。&lt;/p&gt;

</description>
      <category>python</category>
      <category>webdev</category>
      <category>tutorial</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
