Perch Studio
worldclock
Explorer
Explorer
worldclock
mod.json
main.lua
glyphs
Project
Validate
Run in Perch
Publish…
Id worldclock
Version 1.0.0
Entry main.lua
Scopes
time
main.lua
mod.json
worldclock main.lua on_start
local M = {}
local city, fmt24 = "Tokyo", true
local function payload()
local t = perch.time.now_in(city)
return { city = city,
time = perch.time.format(fmt24 and "%H:%M" or "%I:%M %p", t),
sub = perch.time.offset_label(city) }
end
function M.on_start(host)
host.set_presence("worldclock", true, payload())
host.timer("tick", 30 * 1000) -- floored ≥ 1000 ms
end
function M.on_timer(host) host.push_data("worldclock", payload()) end
return M
Preview
Expanded
Single
Dual
HUD
LIVE
worldclock
Problems
Preview Data
Output
No problems detected — the package compiles clean.
Package valid
0 errors · 0 warnings
worldclock/main.lua