public static final Long date2utc ( Date date ) { // use null for a null date if ( date == null ) return null ; long time = date . getTime ( ) ; // remove the timezone offset time -= timezoneOffsetMillis ( date ) ; return time ; }
Converts a gwt Date in the timezone of the current browser to a time in UTC .