clock: simplify zeit usage
Pass the timezone as part of the `instant` call.
This commit is contained in:
parent
4700505362
commit
5a01792fd1
1 changed files with 2 additions and 3 deletions
|
@ -71,9 +71,8 @@ pub fn render(self: *Self, theme: *const Widget.Theme) bool {
|
||||||
self.plane.erase();
|
self.plane.erase();
|
||||||
self.plane.home();
|
self.plane.home();
|
||||||
|
|
||||||
const now = zeit.instant(.{}) catch return false;
|
const now = zeit.instant(.{ .timezone = &self.tz }) catch return false;
|
||||||
const now_local = now.in(&self.tz);
|
const dt = now.time();
|
||||||
const dt = now_local.time();
|
|
||||||
_ = self.plane.print("{d:0>2}:{d:0>2}", .{ dt.hour, dt.minute }) catch {};
|
_ = self.plane.print("{d:0>2}:{d:0>2}", .{ dt.hour, dt.minute }) catch {};
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue