Simple question on hour() function for ESP32 Nano

This is a simple question about what might be happening behind the scenes on the ESP32 Nano for the hour() function.

I have an epoch time value stored in a variable: unsigned long MyTime;

I am not using the ESP's RTC - MyTime is calculated on a MKR1000 and then sent to the ESP32 Nano as part of a transaction.

The time has already been adjusted for the local timezone.

It seems like when I call hour(MyTime) on the ESP32 Nano, the returned value is offset by my local timezone offset (in my case by -5 hours). So 14:00 is returned as 09:00 (14 returned as 9).

On the MKR1000 that set the time in the transaction, the hour is correct for MyTIme in the same transaction: 14.

Does the ESP32 Nano implementation of hour() make some kind of local timezone adjustment or am I barking up the wrong tree?

Thanks.

I don't know the answer about library on Nano ESP32, but the obvious roundabout of the issue might be to set the time on MKR1000 to GMT.

Hi @IraSch.

I'm not familiar with such a function. Please provide a complete and simple sketch in a reply here on this forum topic that demonstrates the use of the hour function. I think that will the forum helpers to provide more effective assistance.