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.

Timezone calculator

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
B
BigToe
Halfop
Posts: 99
Joined: Thu Dec 30, 2010 4:49 pm

Timezone calculator

Post by BigToe »

Hello

My request is for a timezone converter/retriever, using timeanddate.com if thats possible.

1. When a user types !calc GMT the script will retrieve the GMT time in the following format: "The current GMT time is: hh/mm/ss on dd/mm/yyyy"

* This will work for all major timezones, such as UTC, CET and so on.

2. A user can calculate the difference between a certain timezone and his timezone:

!calc 13:00 GMT in Thailand

Script out:

"When it is 13:00 GMT it will be 18:00 in Thailand"

Please?
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

In order to pull out results from the page you mentioned above you would need an account to legally use it's API and that's quite (ridiculously) expensive. Sure, one could also do a script to parse that web page, but requires a tone of work and at some point they might change the layout or simply ban your IP. :D

So... google for an alternative. :)
Once the game is over, the king and the pawn go back in the same box.
B
BigToe
Halfop
Posts: 99
Joined: Thu Dec 30, 2010 4:49 pm

Post by BigToe »

Hi, yeah that is ridicules, sorry, I had no idea.

How about these alternatives:

1. Worldtimeserver
2. Timezoneconverter
3. worldtimebuddy
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Hi,

from what I've seen this types of sites offer a free account that's ad-supported and it's limited in functions and a "premium" account with access to it's API (if they have one). Also, they all have a TOS (short of Terms Of Service) with that you agree upon continuing visiting their site that states you aren't allowed to use any sort of program/script to fetch any information off their site, hence the fees.

Bottom line is that you won't find what the features you are looking for without paying anything, even if you ignore what's written in it's TOS (see IMDB script for instance) and go ahead with parsing a site, mainly cos have limited functions.

The only remaining solution would be creating your own database with timezone for each city, country or whatever you want and take things from there onwards.
Once the game is over, the king and the pawn go back in the same box.
B
BigToe
Halfop
Posts: 99
Joined: Thu Dec 30, 2010 4:49 pm

Post by BigToe »

Can it use http://www.wolframalpha.com?

Theres lots of stuff it can calculate from there, including timezones
User avatar
heartbroken
Op
Posts: 110
Joined: Thu Jun 23, 2011 11:15 pm
Location: somewhere out there

Post by heartbroken »

BigToe wrote:Can it use http://www.wolframalpha.com?

Theres lots of stuff it can calculate from there, including timezones
Wolframagaz by MenzAgitat : http://scripts.eggdrop.fr/details-Wolframagaz-s144.html
Life iS Just a dReaM oN tHE wAy to DeaTh
B
BigToe
Halfop
Posts: 99
Joined: Thu Dec 30, 2010 4:49 pm

Post by BigToe »

Thanks, but I need an API key and that seems to cost at least $150 a year, so thats not good either
User avatar
heartbroken
Op
Posts: 110
Joined: Thu Jun 23, 2011 11:15 pm
Location: somewhere out there

Post by heartbroken »

Code: Select all

GET STARTED FOR FREE

Sign up for a free development account. Immediate access up to 2000 non-commercial API calls per month. 
i just sign up and i get my "key" ..
and tested on my eggdrop1.8 and its working without any problem at all...
Life iS Just a dReaM oN tHE wAy to DeaTh
B
BigToe
Halfop
Posts: 99
Joined: Thu Dec 30, 2010 4:49 pm

Post by BigToe »

Signed up where, for the trial? can you link me to wherever you signed up please?
User avatar
heartbroken
Op
Posts: 110
Joined: Thu Jun 23, 2011 11:15 pm
Location: somewhere out there

Post by heartbroken »

Code: Select all

	 ############################################################################
	# CONFIGURATION
	 ############################################################################

	# Clé d'API
	# Pour obtenir gratuitement une clé d'API : http://products.wolframalpha.com/api/
	variable API_key "XXXXXX-XXXXXXXXXX"
go in that URL and you gonna see there :

Code: Select all

V 2.0 JUST RELEASED!

GET STARTED FOR FREE

Sign up for a free development account. Immediate access up to 2000 non-commercial API calls per month. 
click on "SIGN UP" ..when your account created click on "Get an AppID" done...
Life iS Just a dReaM oN tHE wAy to DeaTh
B
BigToe
Halfop
Posts: 99
Joined: Thu Dec 30, 2010 4:49 pm

Post by BigToe »

You're awesome! thanks!
Post Reply