Others said that it might not be a good idea to do this - I think it depends on your situation, but using UTC certainly has something to consider.
However, I think you missed something here: the number of seconds that occurred since January 1, 1970 UTC (as the Unix era is always determined), and in fact it is the same as in London, since the offset by this date was 0) available with any of these expressions:
System.currentTimeMillis() new Date().getTime() Calendar.getInstance().getTime().getTime()
If you think about it, the number of milliseconds from now on does not change depending on what time zone you are in.
Oh, and the normal suggestion is for a much better API with date and time, see Joda Time .
source share