Google World Time

Recommended Posts

gseller 1

gseller 1

Hey all, Thanks to Nahuel for helping me and Smoke_N's function and INETGetSource and StringRegExp we can now tap into www.google.com Latest API for time and timezone information. They way it works is if you go to www.google.com and type for your search "time morocco" you will get the time and date and timezone information at the top of the search. I was having fits getting this to work and Nahuel helped me get-R-done in the help section...

Herer is the file:

Please give me some feedback, I still have a slight bug in that it still shows the < b > tags in the string. I tried working them out but coulcn't get the right StringRegExp. If someone can work that out and post it would be awesome..

Share this post

Link to post

Share on other sites

martin 72

martin 72

Hey all, Thanks to Nahuel for helping me and Smoke_N's function and INETGetSource and StringRegExp we can now tap into www.google.com Latest API for time and timezone information. They way it works is if you go to www.google.com and type for your search "time morocco" you will get the time and date and timezone information at the top of the search. I was having fits getting this to work and Nahuel helped me get-R-done in the help section...

Herer is the file:

Please give me some feedback, I still have a slight bug in that it still shows the < b > tags in the string. I tried working them out but coulcn't get the right StringRegExp. If someone can work that out and post it would be awesome..

Share this post

Link to post

Share on other sites

sandman 0

sandman 0

London and Paris, when searched on Google, have other bolded values below them for cities in the US called Paris and London. I guess that breaks the regular expression.

(Try searching "time london" and "time paris" to see what I'm talking about; compare those to "time new york" and "time morocco".)

It's a pretty cool script, though; good job gesller!

Edited November 4, 2007 by sandman

[center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]

Share this post

Link to post

Share on other sites

gseller 1

gseller 1

Thank You, thank you! I will be using this one at work alot. I know about the added info for like you said london or russia or someplace that has multiple time zones but don't know how I could go about setting it up to grab the entire expression from google. Any ideas would be very welcome..

Share this post

Link to post

Share on other sites

martin 72

martin 72

Thank You, thank you! I will be using this one at work alot. I know about the added info for like you said london or russia or someplace that has multiple time zones but don't know how I could go about setting it up to grab the entire expression from google. Any ideas would be very welcome..

This is a rather crude way to get the times for the first city found when there is more than one, or more than one time zone.

Share this post

Link to post

Share on other sites

gseller 1

gseller 1

Yes, I love the one Skizmata did and have been tinkering with it to see if I could change it to do editing within a listview or edit (for my purposes)but no luck so far. I will have to search for Toady's, have not seen it yet. Thank you...

Also, I do not see that google offers this military/24hr time format. You could add a clock device to the existing script to have it add to the time format or adjust the regexpression but is not something I wish to pursue for mine script. What you make of my script can be anything you wish. The code is there... Enjoy!