Zanduino / MCP7940

Arduino Library to access the MCP7940M, MCP7940N and MCP7940x Real-Time chips
GNU General Public License v3.0
37 stars 22 forks source link

How can i get number of seconds since Epoch #59

Closed tkralj closed 3 years ago

tkralj commented 3 years ago

Hello , i want to create OTP token using Arduino TOTP Library. I dont know how to get number of seconds since Epoch using your library. Can you help please ?

SV-Zanshin commented 3 years ago

This would be done in the DateTime class using "unixtime" - that would be the number of seconds since 01.01.1970 00:00:00.

See the library wiki page at DateTimeClass

Does that answer your question?

tkralj commented 3 years ago

Hello, yes, that's it. Thank you !

From: Arnd notifications@github.com Sent: Tuesday, January 19, 2021 4:24 PM To: Zanduino/MCP7940 MCP7940@noreply.github.com Cc: Tomislav tomislav@softlab.hr; Author author@noreply.github.com Subject: Re: [Zanduino/MCP7940] How can i get number of seconds since Epoch (#59)

This would be done in the DateTime class using "unixtime" - that would be the number of seconds since 01.01.1970 00:00:00.

See the library wiki page at DateTimeClasshttps://github.com/Zanduino/MCP7940/wiki/DateTimeClass

Does that answer your question?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Zanduino/MCP7940/issues/59#issuecomment-762913968, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AH6ST2XW7OB6FNSKJGBXXTLS2WP2RANCNFSM4WI4Q7NQ.

SV-Zanshin commented 3 years ago

Excellent, glad to be able to help.