user17335: I have an UNIX Timestamp in my Arduino Sketch and would like to get the day of the week of this timestamp (1-7). 
How can I convert the timestamp to get the day of the week?

user13432: The simplest solution to that problem is to download the Time library and use the weekday() function:
int weekday(time_t t); // the weekday for the given time 

Cheers!

17335: <p>I have an UNIX Timestamp in my Arduino Sketch and would like to get the day of the week of this timestamp (1-7). </p>

<p>How can I convert the timestamp to get the day of the week?</p>
 13432: <p>The simplest solution to that problem is to download the <a href="https://github.com/PaulStoffregen/Time" rel="nofollow">Time</a> library and use the <a href="https://github.com/PaulStoffregen/Time/blob/master/TimeLib.h#L114" rel="nofollow">weekday()</a> function:</p>

<pre><code>int weekday(time_t t); // the weekday for the given time 
</code></pre>

<p>Cheers!</p>
