am 2124d7e1: Merge "Only use a fixed timestamp when packaging."

* commit '2124d7e1e2dec91ce4ab15c6a215d61f7693a8d6':
  Only use a fixed timestamp when packaging.
This commit is contained in:
Tao Bao
2015-09-30 23:50:49 +00:00
committed by Android Git Automerger
2 changed files with 23 additions and 6 deletions

View File

@@ -20,7 +20,6 @@ Build image output_image_file from input_directory and properties_file.
Usage: build_image input_directory properties_file output_image_file
"""
import datetime
import os
import os.path
import re
@@ -401,11 +400,10 @@ def ImagePropFromGlobalDict(glob_dict, mount_point):
"""
d = {}
# Use a fixed timestamp (01/01/2009) for all the files in an image.
# Bug: 24377993
epoch = datetime.datetime.fromtimestamp(0)
timestamp = (datetime.datetime(2009, 1, 1) - epoch).total_seconds()
d["timestamp"] = int(timestamp)
if "build.prop" in glob_dict:
bp = glob_dict["build.prop"]
if "ro.build.date.utc" in bp:
d["timestamp"] = bp["ro.build.date.utc"]
def copy_prop(src_p, dest_p):
if src_p in glob_dict: