Time as XML - abstractive/timez GitHub Wiki
#Time as XML
Get XML response from Time Zone
Request
time = Timez::XML.get_time('Asia/Colombo', 'YOUR_API_KEY')
Response
<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<result>\n\t<status>OK</status>\n\t<message></message>\n\t<countryCode>LK</countryCode>\n\t<zoneName>Asia/Colombo</zoneName>\n\t<abbreviation>IST</abbreviation>\n\t<gmtOffset>19800</gmtOffset>\n\t<dst>0</dst>\n\t<timestamp>1434408657</timestamp>\n</result>
Get XML response from Location
Request
time = Timez::Xml.get_time_location('LATITUDE', 'LONGITUDE', 'YOUR_API_KEY')
Response
<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<result>\n\t<status>OK</status>\n\t<message></message>\n\t<countryCode>BJ</countryCode>\n\t<zoneName>Africa/Porto-Novo</zoneName>\n\t<abbreviation>WAT</abbreviation>\n\t<gmtOffset>3600</gmtOffset>\n\t<dst>0</dst>\n\t<timestamp>1434394896</timestamp>\n</result>