🇨🇳 Epoch / Unix timestamp to Shanghai time
Convert a Unix timestamp (seconds since 1 Jan 1970 UTC) into local time in Shanghai (CST) — daylight saving applied for the date of the timestamp.
Right now: 1781875492 = Fri, Jun 19, 2026, 9:24 PM UTC+08:00
Current epoch (seconds) in Shanghai (GMT+8)
Common timestamps in Shanghai
| Epoch (seconds) | Shanghai local time | Note |
|---|---|---|
| 0 | Thu, Jan 1, 1970, 8:00 AM UTC+08:00 | the Unix epoch |
| 1000000000 | Sun, Sep 9, 2001, 9:46 AM UTC+08:00 | one billion seconds |
| 1225789200 | Tue, Nov 4, 2008, 5:00 PM UTC+08:00 | Nov 2008 (a DST edge in the US/EU) |
| 1500000000 | Fri, Jul 14, 2017, 10:40 AM UTC+08:00 | Jul 2017 |
| 1609459200 | Fri, Jan 1, 2021, 8:00 AM UTC+08:00 | Jan 1, 2021 UTC |
In code
// JavaScript — epoch seconds -> Shanghai
const epoch = 1225789200;
new Date(epoch * 1000).toLocaleString("en-US", {
timeZone: "Asia/Shanghai",
});
// Via the API:
// GET https://tz.wrapper-agency.com/api/v1/tz?from=UTC&to=Asia%2FShanghai&epoch=1225789200Other zones: UTC, New York, Los Angeles, London, Paris.