Asia/Shanghai

The current time and date right now in the Asia/Shanghai time zone.

UTC+08:00

Loading...
Loading...

Timezone Profile

Daylight Saving TimeNot available
IANA TimezoneAsia/Shanghai
Offset+08:00

The primary country that uses the time zone Asia/Shanghai is 🇨🇳 China.

UTC

Daylight Saving Time
DST is not observed

Date and Time Format Standards

The table provides a side-by-side comparison of different date and time format standards. Each row represents a unique format standard such as ATOM, COOKIE, ISO, and RFC, among others.
Format
Date and Time
ATOM2024-12-04T14:31:45.041+08:00
COOKIEWed, 04 Dec 2024 14:31:45 +0800
HTTPWed, 04 Dec 2024 06:31:45 GMT
ISO2024-12-04T14:31:45.041+08:00
ISO 86012024-12-04T14:31:45.041+08:00
MM-dd-yyyy HH:mm:ss12-04-2024 14:31:45
MongoDB2024-12-04T06:31:45.041Z
MySQL DATETIME2024-12-04 14:31:45
RFC 1036Wed, 04 Dec 24 14:31:45 +0800
RFC 1123Wed, 04 Dec 2024 14:31:45 +0800
RFC 2822Wed, 04 Dec 2024 14:31:45 +0800
RFC 33392024-12-04T14:31:45+0800
RFC 7231Wed, 04 Dec 2024 14:31:45 GMT+8
RFC 822Wed, 04 Dec 24 14:31:45 +0800
RFC 850Wednesday, 04-Dec-24 14:31:45 GMT+8
RSSWed, 04 Dec 2024 14:31:45 +0800
SQL2024-12-04 14:31:45.041 +08:00
SQL Time14:31:45.041 +08:00
UTC2024-12-04T06:31:45.041Z
Unix Epoch1733293905
W3C2024-12-04T14:31:45+08:00
dd-MM-yyyy HH:mm:ss04-12-2024 14:31:45
yyyy-dd-MM HH:mm:ss2024-04-12 14:31:45
yyyy-dd-MM hh:mm:ss a2024-04-12 02:31:45 PM

Related Time Zones

A table with a list of time zones that have the same time offset. Including name and time zone abbreviations.

There are 27 time zones in the table.
IANA Timezone
Offset Name
Abbr
Antarctica/CaseyAustralian Western Standard TimeGMT+8
Asia/BruneiBrunei Darussalam TimeGMT+8
Asia/ChoibalsanUlaanbaatar Standard TimeGMT+8
Asia/ChongqingChina Standard TimeGMT+8
Asia/ChungkingChina Standard TimeGMT+8
Asia/HarbinChina Standard TimeGMT+8
Asia/Hong_KongHong Kong Standard TimeGMT+8
Asia/IrkutskIrkutsk Standard TimeGMT+8
Asia/Kuala_LumpurMalaysia TimeGMT+8
Asia/KuchingMalaysia TimeGMT+8
Asia/MacaoChina Standard TimeGMT+8
Asia/MacauChina Standard TimeGMT+8
Asia/MakassarCentral Indonesia TimeGMT+8
Asia/ManilaPhilippine Standard TimeGMT+8
Asia/ShanghaiChina Standard TimeGMT+8
Asia/SingaporeSingapore Standard TimeGMT+8
Asia/TaipeiTaipei Standard TimeGMT+8
Asia/Ujung_PandangCentral Indonesia TimeGMT+8
Asia/UlaanbaatarUlaanbaatar Standard TimeGMT+8
Asia/Ulan_BatorUlaanbaatar Standard TimeGMT+8
Australia/PerthAustralian Western Standard TimeGMT+8
Australia/WestAustralian Western Standard TimeGMT+8
Etc/GMT-8GMT+08:00GMT+8
HongkongHong Kong Standard TimeGMT+8
PRCChina Standard TimeGMT+8
ROCTaipei Standard TimeGMT+8
SingaporeSingapore Standard TimeGMT+8

For Developers

php


<?php

// Solution 1
// Set the default time zone
date_default_timezone_set('Asia/Shanghai');

// Solution 2
// Use this to get the current date and time in the specified time zone.
$timezone = new DateTimeZone('Asia/Shanghai');
// Create a new DateTime object
$date = new DateTime('now', $timezone);
// Print the current date and time
echo $date->format('Y-m-d H:i:s'); // 2023-01-01 00:00:00

python


# Solution 1
# Set the default time zone
from datetime import datetime
# Import the pytz module
import pytz
  
# Create a timezone object
tz = pytz.timezone("Asia/Shanghai")
# Get the current time
time_now = datetime.now(tz)
# Format the current time
current_time = time_now.strftime("%H:%M:%S")
  
# Print the current time
print("The current time:", current_time) # The current time: 00:00:00

javascript


/* 
* Solution 1
* Set the default time zone
*/
const date = new Date();
/* 
* Use the toLocaleString() method to get the current date and time in the specified time zone.
*/
const currentTime = date.toLocaleString("en-us", {timeZone: "Asia/Shanghai"});
/* 
* Print the current date and time
*/
console.log(currentTime); // 1/1/2023, 12:00:00 AM