Time Zone information for Google Calendar Event Query - timezone

I would like to use following url to retrive the hoildays for each country
http://www.google.com/calendar/feeds/tr.turkish%23holiday%40group.v.calendar.google.com/public/full
As i am developing application for windows phone, i don't know in which country it will be used.
So i am trying to find the language.timezone combination which i can formulate to use.
I check the following link for timezone names, http://www.timezoneconverter.com/cgi-bin/zonehelp.tzc
but its different than what google accepts.
like, Turkey listed as Europe/Istanbul, but google acceptes as tr.turkish. if I try tr.Europe/Istanbul, i get error.
Another example South Africa is accepted as en.sa. I can't find the corelation between country codes and timezone codes.
is there any way to find the list for all countries to code in program that google accepts?
Thanks a lot for the help

Related

How to scrape real-time data from a website that requires login? [duplicate]

I've used importxml to get public info from a website. But sometimes info changed when we access though different country. For example http://www.ebay.com/itm/221998403138?_trksid=p2057872.m2749.l2649&var=520870142881
this item is not available in USA but when we'll access from different country where seller shipped or changed the country of shipping, we can find the shipping cost. If I use importxml from Google Sheet, that means the access country will be USA. How far I understand i can't change the IP of Google Sheet. So I would like to know if is there any way to sent login detail though URL. That means I want to specific Google Sheet to access URL though my login details(username and password).
So that shipping cost will appear under xpath.
//*[#id="fshippingCost"]/span[1] -- Non-US country where seller ship
//*[#id="shSummary"]/span[1] - USA, shipping is not available
Please see the image for clarification.
http://prntscr.com/ad6fqi
IMPORTXML is a Google Sheets built-in function that use Google servers to be ran anonymously. The same applies to IMPORTDATA, IMPORTFEED, IMPORTHTML.
If you need to sign in in order to get access to restricted access information you should use another thing like the URL Fetch Service from Google Apps Script. It could be used to create a custom function like IMPORTJSON, or other types of scripts.
Related
How to know if Google Sheets IMPORTDATA, IMPORTFEED, IMPORTHTML or IMPORTXML functions are able to get data from a resource hosted on a website?
References
https://developers.google.com/apps-script/guides/sheets/functions

How to get country specific result (only for UK) in HERE MAP iOS SDK?

HEREDeveloperSupport
Is there any method for AutoSuggestionRequest to get country specific result?
I am using the Native IOS SDK premium edition version 3.15,i need to show UK results only.
I am following the below code
let autoSuggestionRequest = NMAPlaces.sharedInstance()!.createAutoSuggestionRequest(location:geo,
partialTerm:text, resultType:getResultType())
autoSuggestionRequest?.languagePreference = languageLabel.text
I can't find this option in the 3.x Premium SDK (though I might also be missing it). As a workaround you can directly call the Autosuggest endpoint of the Search & Geocoding API. Using the "in" parameter and country code you can limit your results to a specific country.
Alternatively you can filter the results based on their country afterwards, though I understand that is less than convenient.
As per my R&D (posting date) and discuss with the HERE MAP support team on slack, there is no any method to find the Specific country address search result for example show UK results only. ( 3.x Premium SDK)
Now, I have created custom auto search bar using the POST API and it's working fine but it's showing the search address in your current location.

Given an address, how can I get the congressional district?

Is there a library or service that returns the US federal congressional district given a US address?
You can do this on govtrack.us. I am not sure if there is a code framework for this, but you could probably write one from this information.
Full disclosure - I work for a company that also provides congressional district data - smartystreets.com
Keep in mind that this information changes often and I have been looking for the last 4.5 years and haven't yet pinpointed an actual, absolutely reliable source for this data. All of the companies I have looked at, including mine, say that their source is the US Postal Service but no one in the US Postal Service has been willing to tell me how frequently the data is updated within their system and what their source might be. So, just be aware.
I'm one of the creators of Geocodio and we had this problem ourselves. So we made it part of our geolocation tools!
You can use the Geocodio API or spreadsheet upload to look up Congressional districts, Representative/Senator contact information, etc. Docs: https://www.geocod.io/docs/#congressional-districts
You can use the Sunlight Foundation Congress API, which is free to use. Go to: http://tryit.sunlightfoundation.com/congress You can determine congressional district by zipcode (not completely reliable since zipcodes can traverse multiple districts) or by latitude/longitude. Just use Google geocoding to retrieve lat/lng from your address, and then you can look up the congressional district.
The whoismyrepresentative.com/api site can translate a zipcode into a congressional district. You can do a call with the url below, replacing 10038 with your zipcode.
http://whoismyrepresentative.com/getall_mems.php?zip=10038&output=json
Hope that helps!
**Also note that the sunlightfoundation site returns a 404 error and govtrack.us does not have an api for searching for congressional districts.

Get timezones based on zipcode

I want to get the current time based on my input zipcode in php.
E.g. If i will enter 71020 then I want the accurate time of that location.
Is there any web service exists to which I can make a call by sending parameter as zipcode.
Please help me out.
Thanks
First use a service that will give you the latitude and longitude on a zip code. There are many, but an easy one is GeoNames. If you search here on StackOverflow or Google, you will find plenty of others.
Then take a look at the many different ways you can resolve a time zone from a latitude and longitude.

Resolve city code from user input

There are a lot of geocode services out there (like http://geo-autocomplete.googlecode.com/svn/trunk/demo/ui.demo.html for example) where user can write a location (or part of it) and it will be resolved to real existing location.
There is also a lot of info provided with the search result (like country ISO code, coordinates, etc..), but none of the services seem to provide country and city code.
What I mean is a code used to phone to certain are. For example Country code for Germany will be 49 and for city of Dusseldorf will be 211.
Is there any service, where I can get this info from the user input. Or is there any way to combine the two. For example I get city name from google geocode service and the try it on some city codes database. If yes, can anyone please provide me with links.
You can use for instance Yahoo's GeoPlanet. For more elaboration on services to solve your problem you might want to check out this answer on gis.stackexchange.com, which seems to cover the kind of service you need.

Resources