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
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.
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
- aidan_the_tinkerer
- Posts: 50
- Joined: Fri Nov 01, 2019 2:48 pm
Re: MQTT time feature
Ended up using the MQTT time example instead
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.