@Nullable public Date convert(@Nullable Date srcDate,TimeZone srcTimeZone,TimeZone dstTimeZone){
  if (srcDate == null)   return null;
  Preconditions.checkNotNullArgument(srcTimeZone,"srcTimeZone is null");
  Preconditions.checkNotNullArgument(dstTimeZone,"dstTimeZone is null");
  int srcOffset=srcTimeZone.getOffset(srcDate.getTime());
  int dstOffset=dstTimeZone.getOffset(srcDate.getTime());
  return new Date(srcDate.getTime() - srcOffset + dstOffset);
}

@ Nullable public Date convert ( @ Nullable Date srcDate , TimeZone srcTimeZone , TimeZone dstTimeZone ) { if ( srcDate == null ) return null ; Preconditions . checkNotNullArgument ( srcTimeZone , "srcTimeZone is null" ) ; Preconditions . checkNotNullArgument ( dstTimeZone , "dstTimeZone is null" ) ; int srcOffset = srcTimeZone . getOffset ( srcDate . getTime ( ) ) ; int dstOffset = dstTimeZone . getOffset ( srcDate . getTime ( ) ) ; return new Date ( srcDate . getTime ( ) - srcOffset + dstOffset ) ; }
converts date between time zones .
