aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/sky.lua
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/sky.lua')
-rw-r--r--widgets/sky.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/widgets/sky.lua b/widgets/sky.lua
index aa0ad43..7dbc399 100644
--- a/widgets/sky.lua
+++ b/widgets/sky.lua
@@ -38,7 +38,7 @@ local function draw_arc(cr, x, y, w, h, colors, rise, set, now)
cairo_curve_to(cr, c1[1], c1[2], c2[1], c2[2], p3[1], p3[2])
cairo_stroke(cr)
- local t = weather.sun_t(now, rise, set) or 0
+ local t = weather.sun_t(now, rise, set)
local function bez(a, b, c, d)
local u = 1 - t
return u * u * u * a + 3 * u * u * t * b + 3 * u * t * t * c + t * t * t * d
@@ -64,8 +64,8 @@ function M.draw(cr, rect, colors)
local rise, set = w.sun.rise, w.sun.set
local phase, lit = weather.moon(now)
local rows = {
- { 'SUNRISE', os.date('%H:%M', rise) },
- { 'SUNSET', os.date('%H:%M', set) },
+ { 'SUNRISE', weather.clock(rise) },
+ { 'SUNSET', weather.clock(set) },
{ 'DAYLIGHT', weather.duration(set - rise) },
{ 'MOON', weather.num(lit * 100, '%') },
}