import moment from 'moment-timezone' ; internal export function getMomentWithTz ( date , timeZone ? ) { if ( timeZone === 'local' || ! timeZone ) { return moment ( date ) ; } if ( timeZone . toLowerCase ( ) . startsWith ( 'utc+' ) || timeZone . toLowerCase ( ) . startsWith ( 'utc-' ) ) { return moment ( date ) . utcOffset ( Number ( timeZone . slice ( 3 ) ) ) ; } return moment . tz ( date , timeZone ) ; }