dutu / poloLender

Free, open source, high performance bot for lending funds on Poloniex exchange
https://github.com/dutu/poloLender
Other
160 stars 47 forks source link

Minor enhancement request: Loan taken with UTC timezone #33

Closed Shoananas closed 7 years ago

Shoananas commented 7 years ago

Hello,

When looking at the logs with papertrail, I can see when the loans are taken but the timezone used is UTC+2, in your code we can see the utcOffset(120) in poloLender.js: msg = "Loan taken #" + newAC.id + " " + newAC.currency + " " + newAC.amount + " at " + msgRate(newAC.rate) + ", created " + newAC.createdAt.utcOffset(120).format("YYYY-MM-DD HH:mm");

I think it would be better to simply display the time in UTC timezone since Poloniex is using UTC. Or give us the choice through the config vars.

Thank you for your hard work.

Regards,

dutu commented 7 years ago

@Shoananas this is now done in v0.8.0 just released (commit https://github.com/dutu/poloLender/commit/03559507b92cb0d63f805f3febf61c88818edd93) The timezone used to display the times in the console log will be the same as the one indicated in POLOLENDER_STARTTIME . eg, if POLOLENDER_STARTTIME = 2017-05-01T14:00+01:00, timezone +1h will be used for console log.

Let me know if this is what you want and if it works for you. Also note that you can change the timezone in papertrail by going to Settings -> Profile

Shoananas commented 7 years ago

Nice, it's working perfectly, thank you :)