how to calculate GMT timestemp to apoch timestemp ?

50 views
Skip to first unread message

Vijay kumbhani

unread,
Aug 30, 2013, 6:25:54 AM8/30/13
to google-a...@googlegroups.com
Give me algorithms ....
how it calculate 

Vinny P

unread,
Sep 4, 2013, 9:06:02 AM9/4/13
to google-a...@googlegroups.com
On Fri, Aug 30, 2013 at 5:25 AM, Vijay Kumbhani <vnkum...@gmail.com> wrote:
How to calculate GMT timestamp to epoch timestamp?
 


First of all, it's better to discuss UTC time rather than GMT time; see here for an explanation of UTC vs. GMT: http://en.wikipedia.org/wiki/Coordinated_Universal_Time

Secondly, the epoch timestamp is the starting point for UNIX time, so it is always 0 (which can also be expressed as 1/1/1970 00:00). The current timestamp can be retrieved by calling Date.getTime() (this timestamp is timezone-independent - it holds time relative to the epoch, which will be identical in all timezones). If you want to convert this timestamp into a timezone, you must first convert it into a displayable date.

-----------------
-Vinny P
Technology & Media Advisor
Chicago, IL

App Engine Code Samples: http://www.learntogoogleit.com

Reply all
Reply to author
Forward
0 new messages