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

Wrong date for gsm set/get time #70

Closed
manusanilea opened this issue May 4, 2017 · 4 comments
Closed

Wrong date for gsm set/get time #70

manusanilea opened this issue May 4, 2017 · 4 comments

Comments

@manusanilea
Copy link

Hi,
There is a problem for setting and getting the date from GSM module.
The format of time_char variable is "02/12/98,15:56:43" (ref to gps.ino l.151)
With the commit 9c20be6, the day and year have been inverted, but in the gsm file, they are bad :

  • gsm_set_time call command "AT+CCLK= + time_char", and acording to M95 AT commands manual, §14.1, the expected format is "yy/MM/dd,hh:mm:ss±zz"
  • gsm_get_time give date/time as same format but it is copied to time_char wich is not same format

I suggest to change time_char format or to invert date and year in both functions gsm_set_time and gsm_get_time

@manusanilea
Copy link
Author

manusanilea commented May 4, 2017

Oh, my bad, the problem has been corrected with 9c20be6, but the comment has not.

The real date format of time_char is "98/12/02,15:56:43", isn't it ?

@ppescher
Copy link
Contributor

ppescher commented May 4, 2017

Could you please explain where in the gsm.ino file the wrong format is used?

The commit you refer to has fixed the date format to YY/MM/DD, which is what the AT+CCLK command expects. On the contrary, the GPS format was DDMMYY, which has been converted to the correct format.

@ppescher
Copy link
Contributor

ppescher commented May 4, 2017

Posted at the same time ;)

Yes the format has been fixed and it is YY/MM/DD,hh:mm:ss+00 in the time_char variable.

@manusanilea
Copy link
Author

manusanilea commented May 4, 2017

Thank you for your quick answer ;)

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

2 participants