Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time_Offset is not working on Windows machine #6121

Closed
wchaws opened this issue Sep 29, 2022 · 5 comments
Closed

Time_Offset is not working on Windows machine #6121

wchaws opened this issue Sep 29, 2022 · 5 comments

Comments

@wchaws
Copy link

wchaws commented Sep 29, 2022

Bug Report

Describe the bug

Time_Offset is not working on Windows machine

To Reproduce

  • Rubular link if applicable:
  • Example log message if applicable:

log.json

{"host":"251.193.42.39", "user-identifier":"-", "time":"29/Sep/2022:15:04:07 +0800", "method": "GET", "request": "/portals/magnetic/matrix", "protocol":"HTTP/1.1", "status":503, "bytes":22654, "referer": "https://www.productapplications.info/channels/users/transparent"}
{"host":"106.112.85.166", "user-identifier":"-", "time":"29/Sep/2022:15:04:07 +0800", "method": "HEAD", "request": "/technologies/proactive/viral/content", "protocol":"HTTP/1.1", "status":401, "bytes":6689, "referer": "https://www.customerback-end.name/value-added/interfaces/roi"}
{"host":"68.213.244.163", "user-identifier":"-", "time":"29/Sep/2022:15:04:07 +0800", "method": "PATCH", "request": "/revolutionary/one-to-one", "protocol":"HTTP/1.0", "status":405, "bytes":2004, "referer": "https://www.centralmesh.com/collaborative/dynamic"}
  • Steps to reproduce the problem:

config-test.conf

[SERVICE]
    flush        1
    daemon       Off
    log_level    info
    Parsers_File parsers.conf

[INPUT]
    Name tail
    Path log.json
    Path_Key file_name
    Read_from_head true
    parser  adsync

[OUTPUT]
    Match *
    Name                stdout
    Format              json_lines
    json_date_format    iso8601
    json_date_key       __TIME__

parsers.conf

[PARSER]
    Name    adsync
    Format  json
    Time_Format %d/%b/%Y:%H:%M:%S
    Time_Key time
    Time_Keep   yes
    Time_Offset +0800

PowerShell

PS C:\Users\Administrator\Documents\fluent-bit>  C:\"Program Files"\fluent-bit\bin\fluent-bit.exe -c .\config-test.conf
Fluent Bit v1.9.8
* Copyright (C) 2015-2022 The Fluent Bit Authors
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
* https://fluentbit.io

[2022/09/29 07:10:22] [ info] [fluent bit] version=1.9.8, commit=97a5e9dcf3, pid=5644
[2022/09/29 07:10:22] [ info] [storage] version=1.2.0, type=memory-only, sync=normal, checksum=disabled, max_chunks_up=128
[2022/09/29 07:10:22] [ info] [cmetrics] version=0.3.6
[2022/09/29 07:10:22] [ info] [sp] stream processor started
[2022/09/29 07:10:22] [ info] [output:stdout:stdout.0] worker #0 started
{"__TIME__":"2022-09-29T15:04:07.000000Z","file_name":"C:\\Users\\Administrator\\Documents\\fluent-bit\\log.json","host":"251.193.42.39","user-identifier":"-","time":"29/Sep/2022:15:04:07 +0800","method":"GET","request":"/portals/magnetic/matrix","protocol":"HTTP/1.1","status":503,"bytes":22654,"referer":"https://www.productapplications.info/channels/users/transparent"}
{"__TIME__":"2022-09-29T15:04:07.000000Z","file_name":"C:\\Users\\Administrator\\Documents\\fluent-bit\\log.json","host":"106.112.85.166","user-identifier":"-","time":"29/Sep/2022:15:04:07 +0800","method":"HEAD","request":"/technologies/proactive/viral/content","protocol":"HTTP/1.1","status":401,"bytes":6689,"referer":"https://www.customerback-end.name/value-added/interfaces/roi"}

Expected behavior

The __TIME__ 2022-09-29T15:04:07.000000Z should be 2022-09-29T07:04:07.000000Z since the time_offset is +0800

Screenshots

Your Environment

  • Version used: v1.9.8 and v1.9.7
  • Configuration:
  • Environment name and version (e.g. Kubernetes? What version?):
  • Server type and version:
  • Operating System and version: Windows Server 2022 Datacenter 21H2
  • Filters and plugins:

Additional context

@hansimueller66
Copy link

The same here - but problem has always existed - our customers changed the time zone to see the logs promptly in graylog

@JoeShi
Copy link

JoeShi commented Oct 8, 2022

same here. however, we are not able to change the timezone because we have multiple applications.

@PettitWesley
Copy link
Contributor

Seems like a major gap for windows that should be fixed.

@jbongseo
Copy link

it seems fixed in 2.0.8

@PettitWesley
Copy link
Contributor

Also released in 1.9.10

#6368

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants