cronwrap
cronwrap copied to clipboard
Enhancement: Show local time instead of UTC
The time used in the cronwrap email is UTC. My time-zone is UTC+12 and now +13 because of daylight savings.
It is confusing and error-prone having to derive the local time from UTC. So I suggest to use the local time instead of the UTC time when adding the time to the email.
I don't see a button to attach a patch, so I included it as text below.
/usr/local/bin# diff cronwrap cronwrap2
123c123
< result_str.append('%s UTC\n' % (datetime.utcnow() - timedelta(seconds=int(cmd.run_time))))
---
> result_str.append('%s\n' % (datetime.now() - timedelta(seconds=int(cmd.run_time))))
126c126
< result_str.append('%s UTC\n' % datetime.utcnow())
---
> result_str.append('%s\n' % datetime.now())