egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Worldtime1.3.tcl working, again.
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
LOQUILLO
Voice


Joined: 21 Jul 2004
Posts: 14
Location: Perú

PostPosted: Mon Oct 27, 2008 4:47 pm    Post subject: Reply with quote

Updated main post. Fixed typo.
_________________
LOQUILLO
IRC Network: EFnet
Channel: #Spanglish
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
kettavan
Voice


Joined: 02 Jan 2009
Posts: 1
Location: Malaysia

PostPosted: Fri Jan 02, 2009 8:31 am    Post subject: Still not working..... Reply with quote

guys i have tried it but yet not working...

[20:29pm] <@kettavan> !tz miami
[20:29pm] <@tami|an> The time in Miami,United States is

Help me plz.......
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
LOQUILLO
Voice


Joined: 21 Jul 2004
Posts: 14
Location: Perú

PostPosted: Sun Sep 13, 2009 11:14 pm    Post subject: Re: Still not working..... Reply with quote

kettavan wrote:
guys i have tried it but yet not working...

[20:29pm] <@kettavan> !tz miami
[20:29pm] <@tami|an> The time in Miami,United States is

Help me plz.......

Strange, it's working for me.
<LOQUILLO_> !tz miami
<mario_sp> The current time in Miami, Florida, United States is 11:13 PM Eastern Daylight Time (EDT) -0400 UTC @ Sunday, September 13, 2009
_________________
LOQUILLO
IRC Network: EFnet
Channel: #Spanglish
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
hm2k
Halfop


Joined: 11 Sep 2006
Posts: 57
Location: UK

PostPosted: Fri Nov 20, 2009 6:28 am    Post subject: Reply with quote

I wrote a new worldtime.tcl which no longer uses a website to get the data.

I thought you may find this useful...

http://www.hm2k.com/posts/worldtime-tcl

Hope this helps.
Back to top
View user's profile Send private message
Torrevado
Op


Joined: 02 Aug 2006
Posts: 101

PostPosted: Mon Feb 01, 2010 6:30 am    Post subject: speechles' worldtime Reply with quote

speechles, worldtime is not working for me...
Quote:
Tcl error [pub_world_time]: can't read "tzzone": no such variable


About hm2k's script, if I'm not wrong it's a timezone script, not worldtime, isn't it?

Thanks.
Back to top
View user's profile Send private message
hm2k
Halfop


Joined: 11 Sep 2006
Posts: 57
Location: UK

PostPosted: Mon Feb 01, 2010 6:39 am    Post subject: Reply with quote

It's both.

Quote:
The zoneinfo database, also called the tz database, is a collaborative compilation of information about the world's time zones.


See http://en.wikipedia.org/wiki/Zoneinfo

What were you expecting?
Back to top
View user's profile Send private message
Torrevado
Op


Joined: 02 Aug 2006
Posts: 101

PostPosted: Mon Feb 01, 2010 7:37 am    Post subject: Reply with quote

What I meant is this:
Quote:
<torrevado> .tz Madrid
<eggbot> torrevado, The time for the Europe/Madrid timezone is Mon Feb 01 13:35:29 2010


That is the timezone, not the real time, which is 12:35:29.
Back to top
View user's profile Send private message
hm2k
Halfop


Joined: 11 Sep 2006
Posts: 57
Location: UK

PostPosted: Mon Feb 01, 2010 8:11 am    Post subject: Reply with quote

It has nothing to do with timezones vs "real time" as they are the same thing.

Unfortunately, there appears to be an issue with the script...

Quote:

[11:59:23 am] > .tz London
[11:59:24 am] <Bot> HM2K, The time for the Europe/London timezone is Mon Feb 01 12:58:03 2010


It appears the script returns the time one hour ahead.

The problem stems from [clock seconds].

If [clock seconds] is too fast, your system clock may be wrong.

Code:
[root@blade ~]# ntpdate uk.pool.ntp.org
 1 Feb 12:13:03 ntpdate[20281]: step time server 82.219.4.31 offset -3642.419450 sec


That fixed it for me...

Quote:

[12:17:10 pm] > .tz London
[12:17:11 pm] <Bot> HM2K, The time for the Europe/London timezone is Mon Feb 01 12:15:08 2010
Back to top
View user's profile Send private message
Torrevado
Op


Joined: 02 Aug 2006
Posts: 101

PostPosted: Mon Feb 01, 2010 9:06 am    Post subject: Reply with quote

hm2k, I have a question...

your solution would change server time? I'm not root, just have a shell account, so:
Quote:
1 Feb 13:04:30 ntpdate[88094]: bind() fails: Permission denied

Obviously admins won't change server time to match my needs.

Thanks.
Back to top
View user's profile Send private message
hm2k
Halfop


Joined: 11 Sep 2006
Posts: 57
Location: UK

PostPosted: Mon Feb 01, 2010 10:36 am    Post subject: Reply with quote

You need to be root to issue that command. Speak to your system administrators.

There's no two ways about it, their system clock is incorrect and it is in their best interest to fix it.

However, I am working on updating the script to use the ntp protocol rather than the system time, but it's not working yet and is less reliable.
Back to top
View user's profile Send private message
hm2k
Halfop


Joined: 11 Sep 2006
Posts: 57
Location: UK

PostPosted: Mon Feb 01, 2010 6:57 pm    Post subject: Reply with quote

I've now added the "time" protocol to the script.

Download it here: http://hm2k.googlecode.com/svn/trunk/code/tcl/worldtime.tcl

Although I still recommend you fix your system time.

Update: I've now replaced the TIME protocol method with the HTTP time protocol method. This gives you way better support.

Update2: As per Torrevado's request I have now added a time offset, so you can easily offset the time to suit you.


Last edited by hm2k on Tue Feb 02, 2010 8:40 am; edited 1 time in total
Back to top
View user's profile Send private message
Koo
Voice


Joined: 02 Apr 2010
Posts: 37

PostPosted: Sun Apr 18, 2010 3:29 pm    Post subject: Re: speechles' worldtime Reply with quote

Torrevado wrote:
speechles, worldtime is not working for me...
Quote:
Tcl error [pub_world_time]: can't read "tzzone": no such variable


Same here. Sad
Back to top
View user's profile Send private message
hm2k
Halfop


Joined: 11 Sep 2006
Posts: 57
Location: UK

PostPosted: Mon Apr 19, 2010 5:56 am    Post subject: Re: speechles' worldtime Reply with quote

Koo wrote:
Torrevado wrote:
speechles, worldtime is not working for me...
Quote:
Tcl error [pub_world_time]: can't read "tzzone": no such variable


Same here. Sad


Try this instead: http://www.hm2k.com/posts/weather-tcl
Back to top
View user's profile Send private message
Koo
Voice


Joined: 02 Apr 2010
Posts: 37

PostPosted: Mon Apr 19, 2010 9:22 am    Post subject: Re: speechles' worldtime Reply with quote

hm2k wrote:
Try this instead: http://www.hm2k.com/posts/weather-tcl

Thank you for the script hm2k but I already have the weather script. Smile I was looking for a timezone script like this:

Code:
<Me>!tz New York
<Bot> The current time for New York, United States is (time) @ (timezone) (date)
Back to top
View user's profile Send private message
hm2k
Halfop


Joined: 11 Sep 2006
Posts: 57
Location: UK

PostPosted: Mon Apr 19, 2010 1:23 pm    Post subject: Re: speechles' worldtime Reply with quote

Koo wrote:
hm2k wrote:
Try this instead: http://www.hm2k.com/posts/weather-tcl

Thank you for the script hm2k but I already have the weather script. Smile I was looking for a timezone script like this:

Code:
<Me>!tz New York
<Bot> The current time for New York, United States is (time) @ (timezone) (date)


Woops, my mistake, I mean this page:

http://www.hm2k.com/posts/worldtime-tcl Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
Page 3 of 7

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber