title: How to prevent Elasticsearch inserting date type documents as UTC timezone while indexing
body: <p>I'm using below code to insert some documents in elasticsearch index. But when inserting in the es the time is coming as UTC format rather than original GMT+5:30Z format. Where as the Sysout before indexing is giving me correct format as  <strong>2014-08-11T18:23:13.447+05:30</strong> . I want the original timestamp for analytics purpose. Please let me know how to keep the orizinal time format in document</p>
  
  <pre><code>public static IndexResponse addDocumentsQuota(Client client, String index,
          String type, String categoryName) {
  
       IndexResponse indexResponse = null;
       DateTime date = new DateTime();
       System.out.println(date);
       try {
          indexResponse = client.prepareIndex(index, type)
                                       .setSource(jsonBuilder()
                                                  .startObject()
                                                  .field("@timestamp", date)
                                                  .field("category_name", categoryName)
                                                  .field("alert_message", "alert message")
                                                  .field("creation_time", date)
                                                  .endObject())
                                                  .execute()
                                                  .actionGet();
      } catch (ElasticsearchException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      } catch (IOException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }   
      return indexResponse;
  }
  </code></pre>
  
  <p>After indexing:</p>
  
  <pre><code>"_source": {
                 "@timestamp": "2014-08-11T11:57:59.839Z",
                 "category_name": "newCat1",
                 "alert_message": "alert message",
                 "creation_time": "2014-08-11T11:57:59.852Z"
              }
  </code></pre>
  
  <p>Thanks,
  Subhadip</p>