creating world clock
need help
Monday, November 1, 2010 by Ghaniz786 | Discussion: DesktopX Tutorials
hi,
I want to make a worlde clock with 5region at the same time but there is a problem that I want to know how to syc the time from server, how can I loocate the server for time sync. Plz help.
Reply #2 Tuesday, November 2, 2010 4:53 PM
thanks for reply but please would you help me how to use it with desktopX with various type of text (digital) clocks. like gmt est pst. etc.?
Reply #4 Tuesday, November 23, 2010 4:17 AM
or Please tell me how to add +5 or -3 in system time I need just Text based clocks Please help me it is urgent.
Reply #5 Tuesday, November 23, 2010 6:18 AM
Hi, I know its not a dx gadget, but there is a free portable application you can get called Qlock that will allow you to display up to 5 timezones on your desktop and also sync them via the internet http://www.qlock.com/ just scroll down on the download page and at the bottom is the free version
Reply #6 Tuesday, November 23, 2010 9:12 AM
Thanks Dear
I know about Qlock and currently we are using this but we want to make some thing with our own... I have found a DesktopX gadget on Wincustomize by searching world Clock in DesktopX section in which there is a pop up window to set the time and that is showing Analog clock but I want to make just text based clock isn't it possible in DesktopX ???
Reply #7 Tuesday, November 23, 2010 2:21 PM
Put the following script into a text object:
Sub Object_onscriptenter
object.SetTimer 1, 1000
End Sub
Sub object_ontimer1
t = FormatDateTime(time(),3)'---Get your system time
setclock = FormatDateTime(Dateadd("h",6,(t)),3)'---Add 6 hours to your system time
object.text = setclock
End Sub
The setclock line can be modified to however many hours ahead or behind you want to set the clock to. Simply change the 6 to +/- any number.
For example, 8 hours behind your system time would be: setclock = FormatDateTime(Dateadd("h",-8,(t)),3)
For further information check out these tutorials and articles:
ANALOG CLOCK (where I got the snippet of code above)
VBSCRIPT DATE/TIME FUNCTIONS (such as FormatDateTime and Dateadd)
Reply #8 Wednesday, November 24, 2010 9:27 AM
Thanks A lot Sviz,
I knew you may help me but there is another query that if I want to add minutes as well so what to do like my system time is 11;10 I want to add 4:30 to it so should I use
Please Reply.
Reply #9 Wednesday, November 24, 2010 4:38 PM
You need to add a second line after the first 'setclock'
Sub Object_onscriptenter
object.SetTimer 1, 1000
End Sub
Sub object_ontimer1
t = FormatDateTime(time(),3)'---Get your system time
setclock = FormatDateTime(Dateadd("h",6,(t)),3)'---Add 6 hours to your system time
setclock = FormatDateTime(Dateadd("n",30,(setclock)),3) '--Add 30 minutes to the previous line
object.text = setclock
End Sub
Reply #10 Thursday, November 25, 2010 5:46 PM
Dear Sviz
Thank you so very much brother. May God bless you.
Please login to comment and/or vote for this skin.
Welcome Guest! Please take the time to register with us.
There are many great features available to you once you register, including:
- Richer content, access to many features that are disabled for guests like commenting on the forums and downloading skins.
- Access to a great community, with a massive database of many, many areas of interest.
- Access to contests & subscription offers like exclusive emails.
- It's simple, and FREE!
Reply #1 Tuesday, November 2, 2010 9:43 AM
You might try looking at the vbscript here: http://community.spiceworks.com/scripts/show/467-sync-system-time-with-internet-time-server