# Timestamp isn't working for NGINX logs

**URL:** <https://community.grafana.com/t/timestamp-isnt-working-for-nginx-logs/75869>\
**Category:** Explore\
**Tags:** promtail, logs\
**Created:** [November 11, 2022, 6:44pm UTC](https://community.grafana.com/t/timestamp-isnt-working-for-nginx-logs/75869 "2022-11-11T18:44:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kokyenzein](https://avatars.discourse-cdn.com/v4/letter/k/aeb1de/32.png) [@kokyenzein](https://community.grafana.com/u/kokyenzein)\
**Post date:** [November 11, 2022, 6:44pm UTC](https://community.grafana.com/t/timestamp-isnt-working-for-nginx-logs/75869/1 "2022-11-11T18:44:27Z")

</div>

Here is my configuration for promtail config file

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/7/a/7a8d5569afb1556fa4b736c4ac2044c6b5c2da3d.png)  
This is my regex expression:

```auto
"^(?P<ip_address>\\S+) (\\S+) (\\S+) \\[(?P<date>.*)\\] \"(?P<method>\\S+) (?P<url>\\S+) HTTP/(?P<http_version>\\d+\\.\\d+)\" (?P<status>\\d+) (?P<response_time>\\d+|-)"

```

Here is a log that i am ingesting:

```auto
66.249.93.198 - - [03/Jun/2020:09:15:19 +0800] "GET /en/mobile-app.html HTTP/1.1" 301 260

```

I have parsed everything but the timestamp doesn’t seem to work as shown by the Time field

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/7/4/74014f5d9db6870385730993c817ba5d39820ba6.png)

I really don’t know what I am doing wrong. I am grateful for any help

---

<div class="post-metadata">

**Author:** ![armesh49](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@armesh49](https://community.grafana.com/u/armesh49)\
**Post date:** [November 18, 2022, 6:25am UTC](https://community.grafana.com/t/timestamp-isnt-working-for-nginx-logs/75869/2 "2022-11-18T06:25:15Z")

</div>

I found that Grafana Loki has a huge delay on displaying logs with custom timestamp if the custom timestamp is older than 2 hours from “now”.

So just wait like 3 hours then check again in the UI. If it didn’t work you can restart Loki and wait another 3 hours.

I am running Grafana Enterprise, Loki & Promtail in Ubuntu 18 Virtual Machine.

You can do dry run as below to verify the promtail config is parsing the labels & timestamp properly. Make sure you are in same dir as promtail-linux-amd64 when running that, and promtail is set to scrape /sample.log.

**cat /sample.log | ./promtail-linux-amd64 -config.file=promtail-local-config.yaml --stdin --dry-run**
