Is there an equivalent Android class to the BlackBerry's DateTimeUtilities? What I really need is DateTimeUtilities.copyCal(source, dest), and I can write it myself, but I really hate writing functions like this only to find it already exists but I just didn't know. I am aware of clone(), but what I really need is to be able to easily change the timezone of a date without having to worry about DST etc myself.
This would definitely work for me, just a little bit more thorough than I need.
MikeR
2010-07-29 13:34:18
A:
AFter some further review and fiddling I think this is the easiest way to address this issue for me:
public static long applyLocalTimezoneOffsetMillis(long timestampUTC)
{
long offset = TimeZone.getDefault().getOffset(timestampUTC);
return timestampUTC - offset;
}
MikeR
2010-07-27 21:28:39