mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-10 07:26:38 +02:00
fix webserial is now in local timezone
This commit is contained in:
parent
72219cdf17
commit
a77bea55d0
6 changed files with 27 additions and 11 deletions
|
@ -98,12 +98,12 @@ class app {
|
|||
return String(str);
|
||||
}
|
||||
|
||||
String getTimeStr(void) {
|
||||
char str[20];
|
||||
String getTimeStr(uint32_t offset = 0) {
|
||||
char str[10];
|
||||
if(0 == mUtcTimestamp)
|
||||
sprintf(str, "n/a");
|
||||
else
|
||||
sprintf(str, "%02d:%02d:%02d UTC", hour(mUtcTimestamp), minute(mUtcTimestamp), second(mUtcTimestamp));
|
||||
sprintf(str, "%02d:%02d:%02d ", hour(mUtcTimestamp + offset), minute(mUtcTimestamp + offset), second(mUtcTimestamp + offset));
|
||||
return String(str);
|
||||
}
|
||||
|
||||
|
@ -115,7 +115,7 @@ class app {
|
|||
return mUtcTimestamp;
|
||||
}
|
||||
|
||||
inline void setTimestamp(uint32_t newTime) {
|
||||
void setTimestamp(uint32_t newTime) {
|
||||
DPRINTLN(DBG_DEBUG, F("setTimestamp: ") + String(newTime));
|
||||
if(0 == newTime)
|
||||
mUpdateNtp = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue