title: How to get UTC time of my local time with "Z" at the end?
body: <p>I want to get current time in java in UTC:</p>
  <p>So, I'm in Vienna now, the current local time is <strong>16:30:29</strong>, current offset to UTC is <strong>2 hours</strong> and I want to get</p>
  <pre><code>2022-05-27T14:30:29.813Z
  </code></pre>
  <p>with this Z at the end (indicating &quot;Zulu time&quot;).</p>
  <p>with this</p>
  <pre><code>public static String getIsoUtcDate() {
      Instant inst = Instant.now();
      return inst.toString();
  }
  </code></pre>
  <p>I get</p>
  <pre><code>2022-05-27T14:30:29.813923100Z
  </code></pre>
  <p>How to get rid of microseconds?</p>
  <p>I tried with <code>SimpleDateFormat</code> also, but with this I'm unable to get Z at the end.</p>