Closed my-dev closed 9 years ago
Did not time_locale
work? It is weird. I will investigate later.
Hi! Mr.sonots Thank you, Your response.
I tried some pattern of [ time_local ]...but not work...
my environment is as below. file format is such like this ( tab separated )
ERROR 2015-06-12 00:00:00 http://xxx/xxx.html?11111 200 0.00282400 0.00001500 0.00094900 0.00095000 0.00281100
and td-agent.conf is such like this
Then Result In ReceiveMail is.....
2015-06-12 00:00:00 -> 2015-06-11 15:00:00
Changed...You see.
Please, please, invastigate, thank you.
I tested, and it seems working fine. It would be your machine environment problem.
time_locale
option is actually not necessary because Date:
header has timezone information %z
and the default is localtime > https://github.com/u-ichi/fluent-plugin-mail/blob/829c3ff9ac221266479a6bf0778019b801a1cf2c/lib/fluent/plugin/out_mail.rb#L200
I wrote how to test using mailcatcher gem on README > https://github.com/u-ichi/fluent-plugin-mail#development. Can you try this on your machine? You can see mail contents including mail header on http://localhost:1080 with mailcatcher gem. Please check the Received
time and Source
headers.
Hi! Mr.sonots.
Thank you, Your testing.
I will try again too, and see you.
Hi! Mr.sonots
nnn----T_T
I checked my Machine's localtime, below Thu Jun 25 09:29:07 JST 2015
and this issue means by reading from a file. Recieved time and Source headers is valid. it's no problem...
In Log file, it's just [ 2015-06-12 00:00:00 ] ...but it's changed to 2015-06-11 15:00:00...
sorry, many times. I will try again...and again.
thanks.
Do you mean the time is changed on reading with in_tail?
You probably need to add
localtime true
for your in_tail configuration.
Hi! Mr.sonots.
un----
Now I tried it. But.....T_T
My Environment is below... 2015年 6月 25日 木曜日 10:03:21 JST /etc/sysconfig/clock -> ZONE="Asia/Tokyo"
it's no have relation directly, locale info is below... LANG=ja_JP.UTF-8 LC_CTYPE="ja_JP.UTF-8" LC_NUMERIC="ja_JP.UTF-8" LC_TIME="ja_JP.UTF-8" LC_COLLATE="ja_JP.UTF-8" LC_MONETARY="ja_JP.UTF-8" LC_MESSAGES="ja_JP.UTF-8" LC_PAPER="ja_JP.UTF-8" LC_NAME="ja_JP.UTF-8" LC_ADDRESS="ja_JP.UTF-8" LC_TELEPHONE="ja_JP.UTF-8" LC_MEASUREMENT="ja_JP.UTF-8" LC_IDENTIFICATION="ja_JP.UTF-8" LC_ALL=
Maybe, my environment JST perfectly.
this problem is not in mail header infomaition... By reading from logfile, just 2015-06-12 00:00:00 in this logfile... But in Mail Body, change to 2015-06-11 15:00:00...
uh...m
But in Mail Body
Uh, understand. So, you meant the mail body, not date header. I could reproduce it, I will fix it.
Hi! Mr.sonots.
Please investigate Line62 - 72 In out_mail.rb...
Maybe...this part is reason
Yes, you're right. Hold on.
Oh! sorry. pass each other...
Thank You for your supporting...
@my-dev Fixed with this commit https://github.com/u-ichi/fluent-plugin-mail/commit/03e88179989248f880714eacc149b35e5be1c6fa. Could you try with the latest version (0.2.0)?
Mr.sonots...
oh!!! thanks... it's my pleasure.
Mr.sonots. nice to meet you.
Thank You Your Nice Plugin... But, In ReceiveMail, TIme is UTC...
I need JST ( GMT +09:00 ).
Under the situation...such like this.
Please, Check it And help me. Thank you.