Operating System - HP-UX
1819870 Members
2357 Online
109607 Solutions
New Discussion

Timezone for Shanghai in China

 
SOLVED
Go to solution
François Brugère
Frequent Advisor

Timezone for Shanghai in China

Hello all,

Does anyone know the timezone for Shanghaï ?
Is TZ parameter CST is right ?

Thanks for your help.
13 REPLIES 13
Joseph Loo
Honored Contributor

Re: Timezone for Shanghai in China

hi,

refer to this:

http://www.timeanddate.com/worldclock/timezone.html?n=237

regards.
what you do not see does not mean you should not believe
Borislav Perkov
Respected Contributor

Re: Timezone for Shanghai in China

Hi François,

In /usr/lib/tztab CST is Central Standard Time for US and Canada. There is no abreviation for China time. Shanghai is in China Coast Time but it is not in the file.

Regards,
Borislav
melvyn burnard
Honored Contributor
Solution

Re: Timezone for Shanghai in China

CST is for Canada, as far as I can tell. I believe that Shanghai is UTC+8 (8 hours ahead of UTC or GMT), and that the Australian timezone of Western Australia
See
http://www.timeanddate.com/worldclock/results.html?query=shanghai
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Arunvijai_4
Honored Contributor

Re: Timezone for Shanghai in China

http://www.worldtimeserver.com/current_time_in_CN.aspx
CST is perfect.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Guy Humphreys
Valued Contributor

Re: Timezone for Shanghai in China

Hi,

Shanghai is UTC +8 or in the timezone called China time. this is known as CST but don't get the other CSTs mixed up with it

Central Standard Time (Americas) UTC -6
Central Standard Time (Australia) UTC +9:30

HTH
Guy
'If it ain't broke, don't fix it!'
melvyn burnard
Honored Contributor

Re: Timezone for Shanghai in China

Just looked further, it seems there IS a Tz for China known as CST.
As this is not in the tztab file, you may have to create your own entry if there are any time changes for daylight Savings, but it seems there may not be.

South Africa also has no DST, an dthey have a simple entry in /usr/lib/tztab :
# South Africa Standard Time
SAST-2
0 1 1-7 3 1985-2038 0 SAST-2

You could put in:

# China Standard Time
0 1 1-7 3 1985-2038 0 CST-8


and use CST-8 as your timezone
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
François Brugère
Frequent Advisor

Re: Timezone for Shanghai in China

As there is no daylight saving time in China, I set the TZ parameter in /etc/TIMEZONE file to GMT-8.

Thanks for your many answers.

Francois.
Don Mallory
Trusted Contributor

Re: Timezone for Shanghai in China

Just for reference, there is no difference for any timezones in China.

They don't have daylight savings, and the whole country is on the same time. So it doesn't matter whether you are in Kunming in western China or Tsingtao on the far eastern coast.

(I lived ~ 150km southeast of Shanghai for 2 years...)

We always just set everything as UTC+8.

On the bright side, the HP Shanghai offices are pretty responsive and the CE's were pretty good out there.
François Brugère
Frequent Advisor

Re: Timezone for Shanghai in China

Thanks for your answer Dan. My colleague in China ask me why it's not GMT+8 instead GMT-8 as I proposed.

I tested the two values and it seems that the good one is GMT-8 and not GMT+8. Is somebody knows why ?

root@r02tekpu:/root# date -u
Fri Nov 4 08:08:18 UTC 2005
root@r02tekpu:/root# export TZ=GMT+8
root@r02tekpu:/root# date
Fri Nov 4 00:08:29 GMT 2005
root@r02tekpu:/root# export TZ=GMT-8
root@r02tekpu:/root# date
Fri Nov 4 16:08:51 GMT 2005
root@r02tekpu:/root#

Thanks for your help.
Muthukumar_5
Honored Contributor

Re: Timezone for Shanghai in China

Refer this:

http://www.csgnetwork.com/timezncvt.html

-Muthu
Easy to suggest when don't know about the problem!
François Brugère
Frequent Advisor

Re: Timezone for Shanghai in China

Finally, the answer came from HP's support. With HP-UX, the TZ value should be EAT-8 for China timezone.

Regards, Francois.
Arunvijai_4
Honored Contributor

Re: Timezone for Shanghai in China

You can close this thread if it is resolved.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
François Brugère
Frequent Advisor

Re: Timezone for Shanghai in China

.