forked from hummypkg/webif
Better way of determining midnight (does not require jim patch)
This commit is contained in:
parent
789950858d
commit
59bbcc09fb
@ -13,8 +13,10 @@ proc lremove {var val} {
|
||||
}
|
||||
|
||||
# Returns the epoch time for midnight today, accounting for local timezone
|
||||
proc midnight {} {
|
||||
#return $([clock seconds] / 86400 * 86400)
|
||||
set day [clock scan "00:00:00" -format "%T"]
|
||||
proc midnight {} {{today ""}} {
|
||||
if {$today eq ""} {
|
||||
set today [clock format [clock seconds] -format "%Y %m %d"]
|
||||
}
|
||||
return [clock scan "$today 00:00:00" -format "%Y %m %d %T"]
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user