blob: 834b04120185909a489226551e3cea916b53fd28 [file] [log] [blame]
[email protected]08aa02762011-11-11 16:09:311// Copyright (c) 2011 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "base/build_time.h"
6
zforman08d91b72016-02-12 06:23:427// Imports the generated build date, i.e. BUILD_DATE.
8#include "base/generated_build_date.h"
9
[email protected]08aa02762011-11-11 16:09:3110#include "base/logging.h"
[email protected]99084f62013-06-28 00:49:0711#include "base/time/time.h"
[email protected]08aa02762011-11-11 16:09:3112
13namespace base {
14
15Time GetBuildTime() {
16 Time integral_build_time;
maruel1c9b02232016-04-04 20:21:4117 // BUILD_DATE is exactly "Mmm DD YYYY HH:MM:SS".
18 // See //build/write_build_date_header.py. "HH:MM:SS" is normally expected to
19 // be "05:00:00" but is not enforced here.
20 bool result = Time::FromUTCString(BUILD_DATE, &integral_build_time);
[email protected]08aa02762011-11-11 16:09:3121 DCHECK(result);
22 return integral_build_time;
23}
24
25} // namespace base