Apr 01

The TimeZone class has a getOffset() method that will return the offset for a specified date. For example to get the timezone offset for today you would use the following:

Date today = new Date();
TimeZone tz = TimeZone.getDefault();
long offset = tz.getOffset(today);

written by objects \\ tags: , ,

Leave a Reply

You must be logged in to post a comment.