mathew-kurian / Scribe.js

:scroll: Node.js logging made simple! Online access to logs and more...
https://mathew-kurian.github.io/Scribe.js/
MIT License
284 stars 45 forks source link

File dates do not match up with displayed dates #25

Closed mathew-kurian closed 9 years ago

mathew-kurian commented 9 years ago

Please check the live demo and it will be more clear what I mean.

guillaumewuip commented 9 years ago

I don't understand what's the point. I don't see problem : all logs in 25/12 files display 25/12 date, same for 26/12. Maybe a screenshot ?

mathew-kurian commented 9 years ago

Ok thats a good point. I have recorded a video of the application. Unfortunately it has a watermark on the video but I think you should still be able to see the text. Notice how the dates don't really match up correctly.

https://dl.dropboxusercontent.com/u/41760921/Video%2012-26-2014%203-15-30%20AM.mp4

guillaumewuip commented 9 years ago

Ok, I think I understood what's going on. It's probably that Angular and Node are not sharing the same timezone. By default, NodeJS uses the tz of the machine it's running on, and Angular uses the browser timezone. Does it correspond with your tz and the heroku app tz ?

I'm not sure how to handle this. My theory is that the server should be the ref, so the Angular app should ask its timezone via API. Then we simply have to give the timezone to the Angular date filter. Does it seems ok for you ?

mathew-kurian commented 9 years ago

Sounds great! Thanks.