forked from Simnation/Main
ed
This commit is contained in:
parent
1fda30bd8d
commit
1b2b6103cb
3 changed files with 5 additions and 6 deletions
|
@ -1,14 +1,13 @@
|
|||
local Config = {
|
||||
Weather = true,
|
||||
Time = false
|
||||
Time = true
|
||||
}
|
||||
|
||||
local apiKey = "8d27737fd1425cd3d243f54e4f80e765"
|
||||
local city = "Los Angeles"
|
||||
local city = "Berlin"
|
||||
local weatherType = "CLEAR"
|
||||
local lastWeatherUpdate = os.time()
|
||||
|
||||
|
||||
function getRealTime()
|
||||
local now = os.date("*t")
|
||||
local hour = now.hour
|
||||
|
@ -80,7 +79,7 @@ end)
|
|||
]]
|
||||
|
||||
local function getBerlinTime()
|
||||
PerformHttpRequest("https://timeapi.io/api/Time/current/zone?timeZone=America/Los_Angeles", function(statusCode, response, headers)
|
||||
PerformHttpRequest("https://timeapi.io/api/Time/current/zone?timeZone=Europe/Berlin", function(statusCode, response, headers)
|
||||
if statusCode == 200 then
|
||||
local data = json.decode(response)
|
||||
if data and data.hour and data.minute then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue