Chromium Code Reviews| Index: build/write_build_date_header.py |
| diff --git a/build/write_build_date_header.py b/build/write_build_date_header.py |
| index 0ba47049b570377c4e090a4c9d1fc7884afb9261..37188950c91782f0792d53b7730857c5b99eb223 100755 |
| --- a/build/write_build_date_header.py |
| +++ b/build/write_build_date_header.py |
| @@ -75,7 +75,13 @@ def main(): |
| if args.build_date_override: |
| build_date = args.build_date_override |
| else: |
| - build_date = GetBuildDate(args.build_type, datetime.datetime.utcnow()) |
| + now = datetime.datetime.utcnow() |
| + if now.hour < 5: |
| + # The time is locked at 5:00 am in UTC to cause the build cache |
| + # invalidation to not happen exactly at midnight. Take the day before. |
| + # See //base/build_time.cc. |
|
Nico
2016/03/30 20:34:00
This should also refer to the script that has the
M-A Ruel
2016/03/30 20:38:09
Humm what about changing the script to output the
|
| + now = now - datetime.timedelta(day=1) |
| + build_date = GetBuildDate(args.build_type, now) |
| output = ('// Generated by //build/write_build_date_header.py\n' |
| '#ifndef BUILD_DATE\n' |