Skip to content

Commit 6797e7a

Browse files
committed
corrected DateTime scope error
corrected DateTime scope error
1 parent dc9bd29 commit 6797e7a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Daily_Cheer_Automaton/Arduino/autocheer.ino

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,11 +202,12 @@ void setup() {
202202
void loop() {
203203
// put your main code here, to run repeatedly:
204204

205+
DateTime theTime;
205206
// check time
206207
if (OBSERVE_DST == 1) {
207-
DateTime theTime = dst_rtc.calculateTime(rtc.now()); // takes into account DST
208+
theTime = dst_rtc.calculateTime(rtc.now()); // takes into account DST
208209
} else {
209-
DateTime theTime = rtc.now(); // use if you don't need DST
210+
theTime = rtc.now(); // use if you don't need DST
210211
}
211212

212213
printTheTime(theTime);

0 commit comments

Comments
 (0)