title: Timezone issue: convert to UTC if JVM timezone is in UTC
body: <p>I am facing some issues because of timezone in our apps.</p>
  
  <p>We have some dependent services which send us EST time. We were in EST timezone so there were no any issues before. Recently, we moved to UTC time zone and started seeing the issue. For us, we might again go back and forth (EST/UTC).</p>
  
  <p>So what I want to do is check my JVM time zone and if my timezone is UTC, I want to convert the dependent service's time to UTC and do nothing if we are in EST as dependent service always responds with EST. How do I achieve that?</p>
  
  <p>Data1.java</p>
  
  <pre><code>XMLGregorianCalendar date;
  XMLGregorianCalendar time;
  //getter &amp; setter
  </code></pre>
  
  <p>Util.java</p>
  
  <pre><code>String convertDate(Date d){
      SimpleDateFormat date = new SimpleDateFormat("yyyy-MM-dd");
              try {
                   String converted= dateFormat.format(d);
                  return converted;
              } catch (ParseException e) {
                  throw new RuntimeException(e);
              }
      }
  
      String convertTime(Date d){
              SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
              String Time = "";
              Time =  sdf.format(d);
              return Time;
      }
  }
  </code></pre>
  
  <p>MyApp.java</p>
  
  <pre><code>String date = Util.convertDate(data1.getDate.toGregorianCalendar().getTime())
  String time = Util.convertTime(data1.getDate.toGregorianCalendar().getTime())
  </code></pre>
  
  <p>Here, the date and time string here have the EST date and time which I want to change to UTC if the JVM timezone is UTC and keep it as JVM timezone is EST</p>
  
  <p>Existing output example:</p>
  
  <blockquote>
    <p>date: 2017-08-02<br>
    time: 21:04:04</p>
  </blockquote>
  
  <p>Expected:</p>
  
  <blockquote>
    <p>date: 2017-08-03<br>
    time: 01:04:04 </p>
  </blockquote>