Hi Zet,
that question is in fact a lot of questions.
A microcontroller in general does not know anything about time. It has no operating system, which makes things more complicated in some cases, but helps a lot when speaking about speed and reliability.
Libraries can assist with dealing with things an operating system does on a "standard computer".
If you're speaking about "time zones", you need to know what time it is. Usually, a computer knows the time using internet time servers, or radio clocks, or GPS receivers. A microcontroller by itself doesn't have any of these.
A microcontroller has its system frequency generator, which can be a crystal, or an internal rc oscillator. You can choose at which frequency your microcontroller should run, with 8 bit PICs today up to 64MHz. The controller can count the pulses of that frequency. If you want to run something now and tomorrow at the same time, just run it now and then wait for 64000000*24*60*60 pulses, then run again. The controller doesn't need to know what time it is for that purpose.
If you do want to have a clock time, there are date/calendar libraries to help you to transform that clock pulses in a human-readable time, but you will also need to set the clock every time you're starting the controller.
If you're using the internal frequency generator, it's not guaranteed
to be very accurate, it can be around 2% (=half an hour per day) fast or slow.
Greets,
Kiste
Am Montag, 19. April 2021, 23:51:58 MESZ hat
zet....@gmail.com <
zet....@gmail.com> Folgendes geschrieben:
--
You received this message because you are subscribed to the Google Groups "jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
jallib+un...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/jallib/5b7be137-cda7-47c7-a198-5914804ebf85n%40googlegroups.com.