Timezone issue
See original GitHub issueDoing a test at 2017-09-08 00:06:15, but the time is outputting an hour behind (UTC?). Problem is moment.js isn’t an hour behind (in the same file).
So when it goes to check for the log file, it sees that the today’s log is empty - which is technically right, but both times should line up.
Example messaged placed in yesterday’s file:
[2017-09-07 23:06:15.038] [WARN] message example.
The transport code:
var transport = new winstonMain.transports.DailyRotateFile({
filename: './log',
datePattern: 'yyyy-MM-dd.',
prepend: true,
level: process.env.NODE_ENV === 'development' ? 'debug' : 'info'
});
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
How to Handle Timezones and Synchronize Your Software ...
In this article, I'll introduce time zone issues and share some rules to follow. Quick introduction to time zones. As the earth is...
Read more >Time Zone Issue - Microsoft Community
Time Zone Issue. Hello. I have a Windows 10 operating system, and after a recent update, my computer was displaying the wrong time....
Read more >Days since last timezone issue : r/ProgrammerHumor - Reddit
I haven't had any timezone issues since December 31, 1969.
Read more >Big problems at the timezone database
The last time I wrote about the timezone database on this blog, the database was under threat from a lawsuit. Fortunately that lawsuit...
Read more >how do you deal with timezone issues? - Stack Overflow
Everything in UTC, and another column for the offset.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
im having trouble with local time also, im giving localTime value true but im still getting utc on my log file
Also in my object is displaying the time correctly (hour and minutes)
my log file (at 10:39am on oct 3) 2017-10-03T17:39:27.879Z - info: Usuario prueba creado por: ramon
Why is my file showing utc time? I checked utc time right now and its the same as the one on my log file
@LukeXF
winston-daily-rotate-file
does not use the timezone by moment. Depending on the value of thelocalTime
option, the timezone used will be either UTC or the timezone of the server running the component.