Source language: Translate to:

Time Problem

Questions about NeoBook PlugIns

Moderator: Neosoft Support

Time Problem

Postby Alex » Sun Sep 30, 2007 6:36 am

Hi,

I want to know if there is a Hour World plugin.
If no, my idea is to make that with some functions. That mean that when I select for example New-York, it knows where am I (may be with the DEC Pack Plugin, it looks where stay the computer, in witch country and make a math function).
Just the problem, the summer season Hour.

Thanks


Alex
Alex
 
Posts: 745
Joined: Sat Mar 04, 2006 4:53 am

Postby remlap » Sun Sep 30, 2007 6:49 am

The easiest way to deliver the current time/date of anywhere in the world is to use Google and parse the info out.

example:
http://www.google.com/search?hl=en&rls=com.microsoft%3Aen-US&q=time+cleethorpes

Just remember to look out for multiple locations of the same name eg. Paris.
User avatar
remlap
 
Posts: 141
Joined: Thu Jun 09, 2005 5:23 pm
Location: Lincolnshire, England

Postby Alex » Sun Sep 30, 2007 8:42 am

Hi remlap,

Yes, why not, but I need an Internet connection. If there is an another possibility.

Thanks


Alex
Alex
 
Posts: 745
Joined: Sat Mar 04, 2006 4:53 am

Postby Alex » Sun Sep 30, 2007 9:11 am

I have a problem, how parse the code ?

Thanks


Alex
Alex
 
Posts: 745
Joined: Sat Mar 04, 2006 4:53 am

Postby remlap » Sun Sep 30, 2007 10:49 am

If there is an another possibility.


Not that I know of. I guess you'd need a database of locations together with their GMT +/- settings and an ability in Math which extends beyond my own, especially when it comes to building in Daylight Savings etc.



I have a problem, how parse the code ?


Use the InternetGet command to get the Google page (Time <Location>) and then search the string of html with a substring which is present in all google pages which return the time...

Example:
Code: Select all
alt="Clock"></td><td valign=top><b>


To test the theory, just click this link and find the above string in the page source code.

http://www.google.com/search?hl=en&rls=com.microsoft%3Aen-US&q=time+london

You will find that the location of the string preceeds the actual location time. The remaining proceedures I'm sure you can work out from here.

If you go on to search google for just 'London' and search the html with the above string, you will find it cannot be found. Useful for error trapping purposes.

Of course all of this does assume Internet access and if that isn't available I hope you paid more attention in Math classes than I did :)
User avatar
remlap
 
Posts: 141
Joined: Thu Jun 09, 2005 5:23 pm
Location: Lincolnshire, England

Postby dpayer » Sun Sep 30, 2007 4:30 pm

Alex wrote:Hi remlap,

Yes, why not, but I need an Internet connection. If there is an another possibility.

Thanks


Alex


I am sure you could find a USB based clock that could be queried for time. It may be cheaper to get an internet connection though.

D
User avatar
dpayer
 
Posts: 1383
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Postby TechMedia » Mon Oct 01, 2007 2:47 am

This can be made via a plugin for that.
TechMedia
 

Postby Alex » Mon Oct 01, 2007 9:19 am

Hi Alberto,

Which Plugin ?

Thanks


Alex
Alex
 
Posts: 745
Joined: Sat Mar 04, 2006 4:53 am

Postby Alex » Mon Oct 01, 2007 10:39 am

Hi remlap and dpayer,

Thanks very much for your help, this work very good with GOOGLE.

For the plugin, I am interested.

Thanks


Alex
Alex
 
Posts: 745
Joined: Sat Mar 04, 2006 4:53 am


Return to PlugIn Discussions

Who is online

Users browsing this forum: No registered users and 1 guest

cron