AceTime 3.0.0 Date and time classes for Arduino that support timezones from the TZ Database.

DateConv.cpp
1 /*
2 * MIT License
3 * Copyright (c) 2024 Brian T. Park
4 */
5
6 #include "DateConv.h"
7
8 namespace ace_time {
9
10 void secondsToHms(uint32_t secs, uint16_t* hh, uint16_t* mm, uint16_t* ss) {
11 *ss = secs % 60;
12 uint32_t minutes = secs / 60;
13 *mm = uint16_t(minutes % 60);
14 *hh = uint16_t(minutes / 60);
15 }
16
17 }