[PATCH] D23934: Add a -ffixed-date-time= flag that sets the initial value of __DATE__, __TIME__, __TIMESTAMP__
Alexander Belopolsky via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 16 09:32:04 PDT 2019
Alexander added inline comments.
================
Comment at: lib/Frontend/CompilerInvocation.cpp:2252
+ TM.tm_isdst = -1;
+ mktime(&TM);
+ Opts.FixedDateTime = TM;
----------------
efriedma wrote:
> Does using mktime like this depend on the local timezone?
Since the return value of mktime() is ignored here, its dependence on the local timezone should not matter. The main effect of this call is to fill in tm_isdst flag with the best guess. This may result in unexpected results if fixed-date-time is set inside the "spring forward" hour for the local timezone, but this issue is inherent in the ISO 8601 format.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D23934/new/
https://reviews.llvm.org/D23934
More information about the cfe-commits
mailing list