Chromium Code Reviews| Index: base/build_time.cc |
| diff --git a/base/build_time.cc b/base/build_time.cc |
| index b8b42966908fb47e696f01a2709bb9a90f2bd448..166f0025b3dc50e53409160d14266d7e83ee19ba 100644 |
| --- a/base/build_time.cc |
| +++ b/base/build_time.cc |
| @@ -7,6 +7,11 @@ |
| #include "base/logging.h" |
| #include "base/time/time.h" |
| +// Allow the build date to be set by a define if desired. |
| +#ifndef BUILD_DATE |
| +#define BUILD_DATE __DATE__ |
| +#endif |
| + |
| namespace base { |
| Time GetBuildTime() { |
| @@ -16,11 +21,7 @@ Time GetBuildTime() { |
| // |
| // __DATE__ is exactly "Mmm DD YYYY". |
| // __TIME__ is exactly "hh:mm:ss". |
|
M-A Ruel
2016/01/30 02:58:14
Remove this, this is confusing.
Zachary Forman
2016/02/01 07:28:30
Done
|
| -#if defined(DONT_EMBED_BUILD_METADATA) && !defined(OFFICIAL_BUILD) |
| - const char kDateTime[] = "Sep 02 2008 08:00:00 PST"; |
| -#else |
| - const char kDateTime[] = __DATE__ " " __TIME__ " PST"; |
| -#endif |
| + const char kDateTime[] = BUILD_DATE " 00:00:00 UTC"; |
| bool result = Time::FromString(kDateTime, &integral_build_time); |
| DCHECK(result); |
| return integral_build_time; |