How can I get the seconds since 1.1.1970 as a long in Android?

by Streets Of Boston » Fri, 26 Feb 2010 04:00:55 GMT

Sponsored Links
 System.currentTimeMillis() gets you the number of milliseconds sinc
1/1/1970 00:00:00.000 UTC.


How can I get the seconds since 1.1.1970 as a long in Android?

by Martin » Fri, 26 Feb 2010 04:12:11 GMT

 Woow, thank you :-)
Greetings, Martin


Sponsored Links

Other Threads

1. Problem with looping through the buttons in the Layout

Hi Anil,

Reflection may work for you. Here's an untested example (with
exception handling omitted):

Field field ="button" + i);
int id = field.getInt(null);



2. framework layer interaction


I have a player engine [say] which is in C++ in an android layer. 
And i would like to call player engine APIs by a media player framework.

Can anyone tell me, how media framework can call my player engine API [based on 
file format] which is in C++ ???

Basically i am looking for a framework & library layer interaction, if the 
library is in C++ code.

Thanks & Regards,

      Unlimited freedom, unlimited storage. Get it now, on

3. Android Filesystem for Freescale IMX31 (Booting Problem)

4. equivalent of AWT's FontMetrics

5. APK file size and compiling in Eclipse

6. need to know few apis

7. SurfaceHolder.lockCanvas(dirtyRectangle) bug?