New Flash Digital Clock

| 2 Comments | No TrackBacks

这几天都在重新制作一个时钟,是以服务器时间为基准,计算出来的时间。不论本机设置的时间为什么,只要确定要显示的时区,显示的时间总是准确。
上海时间

基本的概念:
首先服务器时间,时区要设置正确,
1)取得服务器时间,时区值。同本地时间比较,取得差值。
2)输入所需的时区值。
3)计算所需时区的当前时间。
4)显示。
5)回到第2步。
总得方法就是这样。

上面的例子的代码:
<embed src="http://www.yinfor.com/clock/clock.swf?timezone=CCT" width="400" height="30" wmode="transparent" type="application/x-shockwave-flash" />

上面的代码可以自由使用,只是请留言,其中timezone=CCT为上海的时区代码。其它代码如下:
TimeZone Region (City) Time Zone
NZT New Zealand Time (Auckland, Wellington) GMT + 12:00
USZ9 Russia Time 9 (Vladivostok) GMT + 10:00
AEST (Canberra, Melbourne, Sydney) GMT + 10:00
ACST Australia Central Time (Darwin) GMT + 09:30
SAST Australia South Time (Adelaide) GMT + 09:30
USZ8 Russia Time 8 (Yakutsk) GMT + 09:00
JST Japan Time (Tokyo, Osaka, Nagoya) GMT + 09:00
USZ7 Russia Time 7 (Irkutsk, Ulaan Bataar) GMT + 08:00
CCT China Coastal Time (Beijing, Hong Kong) GMT + 08:00
AWST Australia Western Time (Perth) GMT + 08:00
USZ6 Russia Time 6 (Krasnoyarsk) GMT + 07:00
USZ5 Russia Time 5 (Novosibirsk) GMT + 06:00
USZ4 Russia Time 4 (Ekaterinburg) GMT + 05:00
USZ3 Russia Time 3 GMT + 04:00
R2T Moscow, St. Petersburg, Volgograd GMT + 03:00
R1T Russia Time 1 GMT + 02:00
EET Eastern Europe Athens, Istanbul, Minsk GMT + 02:00
CET Central Europe Belgrade, Bratislava, Budapest, Ljubljana, Prague, Brussels, Copenhagen, Madrid, Paris, Sarajevo, Skopje, Sofija, Vilnius, Warsaw, Zagreb, Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna) GMT + 01:00
WET Dublin, Edinburgh, Lisbon, London) GMT + 00:00
EST Eastern Time (US, Canada) GMT - 05:00
CST Central Time (US, Canada) GMT - 06:00
MST Mountain Time (US, Canada) GMT - 07:00
PST Pacific Time (US, Canada, Tijuana) GMT - 08:00


作者: David Yin
原载: FreeThinking
版权所有。转载时必须以链接形式注明作者和及本声明。

No TrackBacks

TrackBack URL: http://www.yinfor.com/mtcgi/mt-t-1202.cgi/520

2 Comments

HI David,

我在google上找online digital clock, 無意間看到了你提供的code. 真的很好用呢.

Just want to say thanks!
希望可以借我一用在我的blog上.

Thanks.

可以。不客气。

Leave a comment

About this Entry

This page contains a single entry by David Yin published on 2004年11月30日 23:14.

Mole - 鼹鼠的故事 was the previous entry in this blog.

旧电脑的用处与用法 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Archives

Online Tools

Code Convertor
GeoURL
Listed on BlogShares