title: Promtail: Timestamp not parsed properly into Loki and Grafana
body: <p>Currently, I am looking to process logs in json format.</p>
  <p>I have managed to convert the given timestamp into a RFC3339 format. However, when parsing it through Promtail, it appears to be parsed but not being used as the displayed timestamp. Rather, it is using the timestamp where Promtail pushed said log to Loki.</p>
  <p>Below is the snippet of my Promtail configuration:</p>
  <pre><code>scrape_configs:
  - job_name: Test
    static_configs:
    - targets:
        - localhost
      labels:
        job: Testing2
        __path__: /path/to/*.json
  
    pipeline_stages:
    - json:
        expressions:
          timestamp: timestamp
    - timestamp:
        source: timestamp
        format: 2006-01-02T15:04:05Z07:00
  </code></pre>
  <p>I have also tried switching the timestamp format to <code>RFC3339</code> to no results as well.</p>
  <p>Below is a sample log I generated</p>
  <pre><code>{&quot;id&quot;:5072,&quot;type&quot;:0,&quot;timestamp&quot;:&quot;2021-06-28T03:00:05+08:00&quot;,&quot;user&quot;:&quot;System&quot;,&quot;ip&quot;:&quot;127.0.0.1&quot;,&quot;computer&quot;:&quot;localhost&quot;,&quot;desc&quot;:&quot;Dummy message&quot;}
  </code></pre>
  <p>This is how the log appears in Grafana. The timestamp field and ts field (which is used for displaying in Grafana) is different.
  <a href="https://i.stack.imgur.com/TKlR6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TKlR6.png" alt="Sample Log as shown in Grafana" /></a></p>
  <p>I would greatly appreciate any help or direction towards debugging. Do let me know if there are any additional information required!</p>