Reputation: 449
What exactly the constant "long android.os.Build.TIME" means?
I tested in my device and I get a strange number which I do not know the meaning.
In http://developer.android.com/reference/android/os/Build.html, it is not explained.
Upvotes: 4
Views: 3532
Reputation: 45503
As @CommonsWare correctly commented: it's a Unix epoch timestamp (in milliseconds) of when the device's ROM was built.
If you dig into the source of the Build
class, you'll find the following:
// The following properties only make sense for internal engineering builds.
public static final long TIME = getLong("ro.build.date.utc") * 1000;
In other words: the value is simply read from the ro.build.date.utc
system property, which is part of the ROM's build.prop
, which on its turn gets generated by buildinfo.sh
.
The more human-friendly equivalent is ro.build.date
, which contains a textual date representation of the same value. For example, in build.prop
you may find:
ro.build.date=Tue Nov 6 13:10:27 CST 2012
ro.build.date.utc=1352229027
There is no associated constant for it in Android's public API, but you could easily retrieve it by calling SystemProperties.get("ro.build.date")
.
That being said, unless you develop for specific ROMs and/or are a ROM developer, you shouldn't really have to care about these values, as the comment in the first code snippet also points out.
Upvotes: 5