ychen added inline comments.
================
Comment at: clang/lib/Lex/PPMacroExpansion.cpp:1612
+ time_t TT = *getPreprocessorOpts().SourceDateEpoch;
+ std::tm *TM = std::gmtime(&TT);
Result = asctime(TM);
----------------
MaskRay wrote:
> ychen wrote:
> > To be consistent with existing code, it might be better to use
> > `std::localtime` instead of `std::gmtime`?
> No. This must use `std::gmtime`. localtime would introduce an undesired UTC
> time offset.
Are you sure? https://linux.die.net/man/3/localtime gmtime/localtime both
accept a UTC time. I think the only difference is the time zone.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135045/new/
https://reviews.llvm.org/D135045
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits