[PATCH] D23934: Add a -ffixed-date-time= flag that sets the initial value of __DATE__, __TIME__, __TIMESTAMP__

2019-10-16 Thread Alexander Belopolsky via Phabricator via cfe-commits
Alexander added a comment.

What is the status of this issue?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D23934/new/

https://reviews.llvm.org/D23934



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D23934: Add a -ffixed-date-time= flag that sets the initial value of __DATE__, __TIME__, __TIMESTAMP__

2019-10-16 Thread Alexander Belopolsky via Phabricator via cfe-commits
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



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits