AceTime  0.8
Date and time classes for Arduino that support timezones from the TZ Database, and a system clock that can synchronize from an NTP server or an RTC chip.
time_offset_mutation.h
1 /*
2  * MIT License
3  * Copyright (c) 2018 Brian T. Park
4  */
5 
6 #ifndef ACE_TIME_TIME_OFFSET_MUTATION_H
7 #define ACE_TIME_TIME_OFFSET_MUTATION_H
8 
9 #include <stdint.h>
10 #include "common/util.h"
11 #include "TimeOffset.h"
12 
13 namespace ace_time {
14 namespace time_offset_mutation {
15 
37 inline void increment15Minutes(TimeOffset& offset) {
38  int16_t minutes = offset.toMinutes() + 15;
39  if (minutes > 960) minutes = -960; // FIXME: This truncates to 15-minutes
40  offset.setMinutes(minutes);
41 }
42 
43 }
44 }
45 
46 #endif