Return a time zone of the given place.
Params | Data type | Descriptions |
country_code required isDst required | string boolean | time zone id , get from geo_details api is for dst , eg: true or false |
{
"timezone": "5.5"
}
var api = 'timezone';
var userId = '<Your User Id>';
var apiKey = '<Your Api Key>';
var language = '<Your Language>' // By default it is set to en
var data = {
country_code: 5.5,
isDst: true,
};
var request = $.ajax({
url: "https://json.astrologyapi.com/v1/"+api,
method: "POST",
dataType:'json',
headers: {
"authorization": "Basic " + btoa(userId+":"+apiKey),
"Content-Type":'application/json',
"Accept-Language": language
},
data:JSON.stringify(data)
});
request.then( function(resp){
console.log(resp);
}, function(err){
console.log(err);
});