update: time with offset
This commit is contained in:
parent
47f52fea58
commit
f38f43dbc4
1 changed files with 4 additions and 0 deletions
|
|
@ -350,6 +350,10 @@ pub const Time = struct {
|
||||||
return unix(std.time.timestamp());
|
return unix(std.time.timestamp());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn now_offset(offset: i64) Time {
|
||||||
|
return unix(std.time.timestamp() + (offset * std.time.s_per_hour));
|
||||||
|
}
|
||||||
|
|
||||||
pub fn today() Time {
|
pub fn today() Time {
|
||||||
return unix(0).setDate(.today());
|
return unix(0).setDate(.today());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue