title: How to convert "2017-04-03T00:00:00" date format to "2017-04-02 03:30:00+05:30" in java?
body: <p>My application generates the date as  <em>"2017-04-03T00:00:00"</em> format, and I am trying to save it in Postgres DB with </p>
  
  <blockquote>
    <p><em>"2017-04-03 00:00:00+05:30"</em></p>
  </blockquote>
  
  <p>. With sql query, the date gets saved in the DB properly. But when I am trying to save it with GROM <code>save()</code> method, it is showing </p>
  
  <blockquote>
    <p><em>"on field 'startdate': rejected value [2017-04-03T00:00:00]"</em></p>
  </blockquote>
  
  <p>I am using <code>org.grails.datastore.gorm.GormInstanceApi.save()</code> API. Here is my code snippet:</p>
  
  <pre><code>def update(name, startdate, enddate) {
      TestExt mydomain = new TestExt (name: name, startdate:startdate, enddate:enddate)
      if(mydomain.hasErrors() || !mydomain.save(flush:true)){
          println mydomain.errors
      }
      // TestExt.executeUpdate("update TestExt set name='"+name +"', start_date='"+startdate +"', end_date='"+enddate +"' where id=1")
  }
  </code></pre>
  
  <p>Can anyone help me with that?
  Many thanks in advance!</p>