This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Worldtime script by Murf not functioning

Old posts that have not been replied to for several years.
Locked
User avatar
arfer
Master
Posts: 436
Joined: Fri Nov 26, 2004 8:45 pm
Location: Manchester, UK

Worldtime script by Murf not functioning

Post by arfer »

worldtime1.1.tcl by Murf has ceased to function on my bot. I saw a comment from another user on the authors site (now seems to be closed) attributing the problem to changes in the website used by the script.

Anybody know how to fix it or know the author?
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

how about writing worldtime script without using a website?
User avatar
YooHoo
Owner
Posts: 939
Joined: Thu Feb 13, 2003 10:07 pm
Location: Redwood Coast

Post by YooHoo »

demond wrote:how about writing worldtime script without using a website?
:roll: yes, how about it...? Seems you might be capable, cos I sure couldn't :mrgreen:
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

well as long as you have some timezone db, it shouldn't be hard to do a lookup for a city
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Take a peek here and you get the gist of the difficulties in trying to create a database especially if new to TCL; the fact that parts of the world switch in and out of DST (Daylight Savings Time) at certain times of the year also has to be taken into account. It's easier to access a website.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Heh, actually mine stopped working as well just a few days ago. People were complaining in the channel why did it stop. I really have no idea, because I didn't change or modify the code and its been the same one since I ever loaded it.

My guess is, the get url might have changed for the website. True we can make a tcl for time via timezones, by calculating the bots current location and using expr with the timezone and gmt, est whatever formats to calculate the current time. But this would be a very longer process I guess. There are like 150-200 known countries and if we some up all these countries and their major cities, then we have a major problemo. Adding each city individually is not what I would recommend (500+ cities), elseif { #someone is paying you for it;}. :P
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

You could just do something for the timezones though :)

Code: Select all

# Greenwich Mean Time / Coordinated Universal Time (UTC) 
set UTC "[clock format [clock seconds] -format %H -gmt 1]"
#  British Summer Time (BST) 
set BST "[time:calc [expr $UTC + 1]]"
# Central European Time (CET) 
set CET "[time:calc [expr $UTC + 1]]"
# Central European Summer Time (CEST)
set CEST "[time:calc [expr $UTC + 2]]"
# Pacific Standard Time (PST) 
set PST "[time:calc [expr $UTC - 8]]"
# Pacific Daylight Time (PDT) 
set PDT "[time:calc [expr $UTC - 7]]"
# Eastern Standard Time
set EST "[time:calc [expr $UTC - 5]]"
# Eastern Daylight Time (EDT) 
set EDT "[time:calc [expr $UTC - 4]]"
Only thing i can't find is the time:calc proc which i seem to have misplaced :|
Locked