🇨🇳 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 timeNote
0Thu, Jan 1, 1970, 8:00 AM UTC+08:00the Unix epoch
1000000000Sun, Sep 9, 2001, 9:46 AM UTC+08:00one billion seconds
1225789200Tue, Nov 4, 2008, 5:00 PM UTC+08:00Nov 2008 (a DST edge in the US/EU)
1500000000Fri, Jul 14, 2017, 10:40 AM UTC+08:00Jul 2017
1609459200Fri, Jan 1, 2021, 8:00 AM UTC+08:00Jan 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=1225789200

Other zones: UTC, New York, Los Angeles, London, Paris.