0

I have installed rsyslog-8.26.0, loganalyzer-4.1.5 and MongoDB 3.4.4 on CentOS7. MongoDB stores all dates and times in UTC and I can see data on Loganalyzer also UTC.

any idea to change this for local timezone?

either change MongoDB default timezone or convert timezone on Loganalyzer when output display?

2 Answers2

0

You can use mongo schema method like below or set default timezone at server side

 tableschema.pre('save', function (next) {

 //You can store timezone according to input and use that for conversion 
 var timezone=this.timezone;
 this.date=date // converted date here using timezone
 next();
}

Best is convert timezone on Loganalyzer when output display , it will support multiple timezone according to client machine

Love-Kesh
  • 777
  • 7
  • 17
0

I found timezone line is commented on php.ini

;date.timezone =

php info says Default timezone UTC

php.ini timezone changed like below

date.timezone = "Australia/Melbourne"

and restart HTTPD

now I can see all logs with my time zone