fix: timezone issue
This commit is contained in:
parent
ad7a6028b3
commit
27cec1d8cc
10 changed files with 27 additions and 28 deletions
models
|
@ -15,11 +15,14 @@ period_create(uint16_t start, uint16_t end)
|
|||
}
|
||||
|
||||
int
|
||||
period_includes_time(period_t *period, uint16_t timestamp)
|
||||
period_includes_time(period_t *period, struct tm *time_struct)
|
||||
{
|
||||
uint16_t start = period->start;
|
||||
uint16_t end = period->end;
|
||||
|
||||
time_t timestamp = time_struct->tm_hour * 60;
|
||||
timestamp += time_struct->tm_min;
|
||||
|
||||
// "normal" timespan
|
||||
if(start < end)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue