[PATCH] D92902: [llvm-elfabi] Add flag to keep timestamp when output is the same

Haowei Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 28 13:00:23 PST 2021


haowei added a comment.

I think I figured out the issue we saw. My local timezone is GMT-8 while @hans and @gargaroff are probably at GMT+1 . When touch is supplied with a time stamp `197001010000` it interpret ate it as local time, so the actual UTC time on my machine would be 197001010800 while on your machines it would be 196912312300, which is probably not valid based on how unix time work. I tried to modify my time zone  to GMT+1 and I encountered the same issue:

  C:\Users\Zero\Downloads\GnuBin\GetGnuWin32\bin>touch -m -t 197001010000 foo
  touch: invalid date format `197001010000'

If I use 197001011200, it works fine:

  C:\Users\Zero\Downloads\GnuBin\GetGnuWin32\bin>touch -m -t 197001020000 foo
  
  C:\Users\Zero\Downloads\GnuBin\GetGnuWin32\bin>

So I think the fix would be just modify the timestamp used in the test from `197001010000` to `197001020000`. It should work anywhere in the world.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92902



More information about the llvm-commits mailing list