fixed issue with unix time
This commit is contained in:
parent
4edf4f5024
commit
a89256d68a
1 changed files with 4 additions and 0 deletions
4
logic.gd
4
logic.gd
|
|
@ -87,6 +87,8 @@ func get_next_break_name() -> String:
|
|||
var currentUnix : int = Time.get_unix_time_from_system()
|
||||
var timezone : Dictionary = Time.get_time_zone_from_system()
|
||||
var todaysUnix : int = (currentUnix % 86400) + 60 * timezone.bias
|
||||
if(todaysUnix > 86400):
|
||||
todaysUnix -= 86400
|
||||
# lunch at 46800
|
||||
# dinner at 64800
|
||||
if(todaysUnix < 46800):
|
||||
|
|
@ -103,6 +105,8 @@ func get_next_break_time() -> String:
|
|||
var currentUnix : int = Time.get_unix_time_from_system()
|
||||
var timezone : Dictionary = Time.get_time_zone_from_system()
|
||||
var todaysUnix : int = (currentUnix % 86400) + 60 * timezone.bias
|
||||
if(todaysUnix > 86400):
|
||||
todaysUnix -= 86400
|
||||
# lunch at 46800
|
||||
# dinner at 64800
|
||||
var seconds_to_break : int = 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue