This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Java in General and the fly likes Converting long timestamp to utc long timestamp. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Converting long timestamp to utc long timestamp." Watch "Converting long timestamp to utc long timestamp." New topic
Author

Converting long timestamp to utc long timestamp.

Ivan Prokopenko
Greenhorn

Joined: Nov 15, 2010
Posts: 3
How long timestamp geted with System.currentTimeMillis() can be converted to UTC long timestamp?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

I googled "UTC long timestamp" and didn't get a clear idea of what that means. So... what is it?
Mohamed Sanaulla
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3068
    
  33

I think its- long value of timestamp(milliseconds) in UTC timezone. You can try using SimpleDateFormat class- where you can specify the format and the timezone. Obtain the Date object from that and then you can get the timestamp in milliseconds(long value)


Mohamed Sanaulla | My Blog
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Converting long timestamp to utc long timestamp.