Rclone Logging Timezone

I have rclone currently log to a file but the date format is showing 24 hour time as well as the server timezone instead of the export TZ="/usr/share/zoneinfo/timezone" I have defined in my bashprofile user file and it being sourced before running the rclone script.

Is there a way to make rclone logging use the TZ enviroment timezone instead of the systemwide one set? As well as using 12 hour instead of 24?

Logging should definitely use the TZ as defined in your environment. It is possible that the go runtime doesn’t understand export TZ="/usr/share/zoneinfo/timezone" - I tried TZ=EST and that worked fine as did TZ=TZ=America/New_York.

Eg

$ rclone-v1.40 -vv help >/dev/null
2018/04/30 21:15:12 DEBUG : rclone: Version "v1.40" starting with parameters ["rclone-v1.40" "-vv" "help"]
2018/04/30 21:15:12 DEBUG : rclone: Version "v1.40" finishing with parameters ["rclone-v1.40" "-vv" "help"]

vs

$ TZ=America/New_York rclone-v1.40 -vv help >/dev/null
2018/04/30 16:15:16 DEBUG : rclone: Version "v1.40" starting with parameters ["rclone-v1.40" "-vv" "help"]
2018/04/30 16:15:16 DEBUG : rclone: Version "v1.40" finishing with parameters ["rclone-v1.40" "-vv" "help"]

That works for me, thanks. I was able to set TZ=America/New_York and it changed the time in the log files.

Is it possible to also use a custom date format? like date +"%r on %D" which would format it like 04/30/18 04:33:01 PM

It isn’t at the moment. It would be a relatively easy feature to add if you fancied having a go? If so please make a new issue on github and I’ll talk you through it there.