| View previous topic :: View next topic |
| Author |
Message |
BigToe Halfop
Joined: 30 Dec 2010 Posts: 99
|
Posted: Sun Dec 08, 2013 12:45 pm Post subject: Timezone calculator |
|
|
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? |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Mon Dec 09, 2013 2:29 am Post subject: |
|
|
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.
So... google for an alternative.  _________________ Once the game is over, the king and the pawn go back in the same box. |
|
| Back to top |
|
 |
BigToe Halfop
Joined: 30 Dec 2010 Posts: 99
|
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Mon Dec 09, 2013 6:14 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
BigToe Halfop
Joined: 30 Dec 2010 Posts: 99
|
Posted: Wed Dec 11, 2013 10:42 am Post subject: |
|
|
Can it use http://www.wolframalpha.com?
Theres lots of stuff it can calculate from there, including timezones |
|
| Back to top |
|
 |
heartbroken Op

Joined: 23 Jun 2011 Posts: 106 Location: somewhere out there
|
|
| Back to top |
|
 |
BigToe Halfop
Joined: 30 Dec 2010 Posts: 99
|
Posted: Wed Dec 11, 2013 11:33 am Post subject: |
|
|
| Thanks, but I need an API key and that seems to cost at least $150 a year, so thats not good either |
|
| Back to top |
|
 |
heartbroken Op

Joined: 23 Jun 2011 Posts: 106 Location: somewhere out there
|
Posted: Wed Dec 11, 2013 11:51 am Post subject: |
|
|
| Code: | 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 |
|
| Back to top |
|
 |
BigToe Halfop
Joined: 30 Dec 2010 Posts: 99
|
Posted: Wed Dec 11, 2013 11:53 am Post subject: |
|
|
| Signed up where, for the trial? can you link me to wherever you signed up please? |
|
| Back to top |
|
 |
heartbroken Op

Joined: 23 Jun 2011 Posts: 106 Location: somewhere out there
|
Posted: Wed Dec 11, 2013 12:05 pm Post subject: |
|
|
| Code: | ############################################################################
# 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: | 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 |
|
| Back to top |
|
 |
BigToe Halfop
Joined: 30 Dec 2010 Posts: 99
|
Posted: Wed Dec 11, 2013 12:49 pm Post subject: |
|
|
| You're awesome! thanks! |
|
| Back to top |
|
 |
|