user42632: I'm using now() and millis() to trigger events after a certain time has passed.
I am aware, and it's also easily found on the web, that millis() rolls over after a certain time has passed and for code that has to run indefinitely you have to handle this.
However I am not aware of if now() can do the same at some point. I mean it does count the seconds from the 1.1.1970 so just regarding this fact, it should not roll over. However, just like millis() this has to be counted somewhere no? How does it work?

user27653: If now() is from the TimeLib.h library, then this definition:
typedef unsigned long time_t;

indicates time_t is 32-bit unsigned value. Since it represents seconds since 1970-Jan-01 00:00:00, it will experience a rollover when representing dates past approximately 2106 (1970-Jan-01 + 2^32 seconds). Being unsigned, it also cannot represent dates earlier than 1970-Jan-01.
This is slightly different than the 2038 Rollover Problem, which occurs when a system defines a time_t as a signed 32-bit integer, and thus experiences this rollover earlier, in year 2038.
All of this depends on how/where the type time_t is defined for your CPU architecture, and this answer assumes an 8-bit AVR like Arduino Uno. If you use a different architecture, for which TimeLib.h has a different type definition, read the source code to find out exactly what you're dealing with.

user4143: now() is a function that is specific to Intel Curie based boards. 
It returns an unsigned long (which on a 32-bit system is the same as an unsigned int) and so can provide the number of seconds since 1/1/1970 up until the year 2106, at which point it will roll over.
If you plan on having your system run continuously for more than the next 88 years you will have to deal with that rollover correctly, including:

Using subtraction to "wrap around" your calculations
Not trying to calculate any periods longer than 136 years


42632: <p>I'm using now() and millis() to trigger events after a certain time has passed.
I am aware, and it's also easily found on the web, that millis() rolls over after a certain time has passed and for code that has to run indefinitely you have to handle this.</p>

<p>However I am not aware of if now() can do the same at some point. I mean it does count the seconds from the 1.1.1970 so just regarding this fact, it should not roll over. However, just like millis() this has to be counted somewhere no? How does it work?</p>
 27653: <p>If <code>now()</code> is from the <a href="https://github.com/PaulStoffregen/Time/blob/master/TimeLib.h" rel="nofollow noreferrer"><code>TimeLib.h</code> library</a>, then <a href="https://github.com/PaulStoffregen/Time/blob/master/TimeLib.h#L21" rel="nofollow noreferrer">this definition</a>:</p>

<pre><code>typedef unsigned long time_t;
</code></pre>

<p>indicates time_t is 32-bit unsigned value. Since it represents seconds since 1970-Jan-01 00:00:00, it will experience a rollover when representing dates past approximately 2106 (1970-Jan-01 + 2^32 seconds). Being unsigned, it also cannot represent dates earlier than 1970-Jan-01.</p>

<p>This is slightly different than the <a href="https://en.wikipedia.org/wiki/Year_2038_problem" rel="nofollow noreferrer">2038 Rollover Problem</a>, which occurs when a system defines a <code>time_t</code> as a <strong>signed</strong> 32-bit integer, and thus experiences this rollover earlier, in year 2038.</p>

<p>All of this depends on how/where the type <code>time_t</code> is defined for your CPU architecture, and this answer assumes an 8-bit AVR like Arduino Uno. If you use a different architecture, for which TimeLib.h has a different type definition, read the source code to find out exactly what you're dealing with.</p>
 4143: <p><code>now()</code> is a function that is specific to <em>Intel Curie</em> based boards. </p>

<p>It returns an <code>unsigned long</code> (which on a 32-bit system is the same as an <code>unsigned int</code>) and so can provide the number of seconds since 1/1/1970 up until the year 2106, at which point it will roll over.</p>

<p>If you plan on having your system run continuously for more than the next 88 years you will have to deal with that rollover correctly, including:</p>

<ul>
<li>Using subtraction to "wrap around" your calculations</li>
<li>Not trying to calculate any periods longer than 136 years</li>
</ul>
