Marc56us wrote:Is there a reason to use a macro and variables?
There is no
technical reason to use a macro and variables.
However, using the macro has the advantage that its name is self-explanatory -- in contrast to time(). And it was not my intention anyway to post code as simple as possible.
The part with the variables were not meant for copy-and-paste for general use, but only for demonstration purposes. Using a variable named 'local' stresses the point that this is the local time.
Marc56us wrote:We can then simplify a little more
Your code can be simplified even more. Since it doesn't contain any variables,
EnableExplicit is not necessary.