Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dayStr/monthStr problem #156

Open
ghost opened this issue Mar 29, 2021 · 0 comments
Open

dayStr/monthStr problem #156

ghost opened this issue Mar 29, 2021 · 0 comments

Comments

@ghost
Copy link

ghost commented Mar 29, 2021

I am using TimerLib for the ESP32 platform and I am getting peculiar output from dayStr/monthStr functions.

sprintf(buffer,”%s, %02d %s %04d",dayStr(day(timer_counter)),day(timer_counter), monthStr(month(timer_counter)),year(timer_counter));
Serial.println(buffer);

The output is January, 01 January 1970. I thought that the dayStr(day(timer)counter) should show a day of the week at 01/01/1970 (Thursday). Could you advise what is wrong?

Adafruit Feather/Metro/Trinket: forums.adafruit.com
Particle Photon: community.particle.io

If you are experiencing trouble but not certain of the cause, or need help using this code, ask on the appropriate forum. This is not the place to ask for support or help, even directly related to this code. Only use this form you are certain you have discovered a defect in this code!

Please verify the problem occurs when using the very latest version, using the newest version of Arduino and any other related software.

----------------------------- Remove above -----------------------------

Description

Describe your problem.

Steps To Reproduce Problem

Please give detailed instructions needed for anyone to attempt to reproduce the problem.

Hardware & Software

Board
Shields / modules used
Arduino IDE version
Teensyduino version (if using Teensy)
Version info & package name (from Tools > Boards > Board Manager)
Operating system & version
Any other software or hardware?

Arduino Sketch

// Change the code below by your sketch (please try to give the smallest code which demonstrates the problem)
#include <Arduino.h>

// libraries: give links/details so anyone can compile your code for the same result

void setup() {
}

void loop() {
}

Errors or Incorrect Output

If you see any errors or incorrect output, please show it here. Please use copy & paste to give an exact copy of the message. Details matter, so please show (not merely describe) the actual message or error exactly as it appears.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants