From e7038964d196f99271a57c8522fbadb400638460 Mon Sep 17 00:00:00 2001 From: yago Date: Sat, 22 Nov 2014 15:59:49 +0100 Subject: [PATCH] Google time location --- plugins/time.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/time.lua b/plugins/time.lua index 4229f66..b222df5 100644 --- a/plugins/time.lua +++ b/plugins/time.lua @@ -67,7 +67,7 @@ function get_time(lat,lng) -- The local time in the location is: -- timestamp + rawOffset + dstOffset local localTime = timestamp + data.rawOffset + data.dstOffset - return localTime + return localTime, data.timeZoneId end return localTime end @@ -78,12 +78,12 @@ function getformattedLocalTime(area) end lat,lng,acc = get_latlong(area) - if lat == nil and lng==nil then - return "It seems that in '"..area.."' they do not have a concept of time." + if lat == nil and lng == nil then + return 'It seems that in "'..area..'" they do not have a concept of time.' end - local localTime = get_time(lat,lng) + local localTime, timeZoneId = get_time(lat,lng) - return "The local time in '"..area.."' is: ".. os.date(dateFormat,localTime) + return "The local time in "..timeZoneId.." is: ".. os.date(dateFormat,localTime) end function run(msg, matches)