MQTT time feature

Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Locked
User avatar
aidan_the_tinkerer
 
Posts: 50
Joined: Fri Nov 01, 2019 2:48 pm

MQTT time feature

Post by aidan_the_tinkerer »

Hello,

I am using the MQTT time function to get the time which I then successfully upload to a dashboard using an ESP32.

To my understanding, the time is in the format of a char pointer, which I then upload the following to my dashboard as: (char *)timehours.lastread

However, I want to correct this for my time zone.

How can I convert this to an int so I can subtract from it?

I've tried to use the atoi function and others but I'm having trouble.

Aidan

User avatar
aidan_the_tinkerer
 
Posts: 50
Joined: Fri Nov 01, 2019 2:48 pm

Re: MQTT time feature

Post by aidan_the_tinkerer »

Ended up using the MQTT time example instead

Locked
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.

Return to “Internet of Things: Adafruit IO and Wippersnapper”