For hg, I can set formatting with --template key to output only date, like this:
> hg log -l1 --template "{date(date, '%Y-%m-%d %H:%M:%S')}\n"
2016-10-07 10:22:41
I can use %z control to output timezone offset:
> hg log -l1 --template "{date(date, '%Y-%m-%d %H:%M:%S %z')}\n"
2016-10-07 10:22:41 +0300
Also, in OpenSuse date realization there is %:::z control for more readable format:
> date +'%Y-%m-%d %H:%M:%S %:::z'
2016-10-07 11:03:34 +03
It's not POSIX control, but is there a way to achieve something like this in hg log formatting? Simple way is not working:
> hg log -l1 --template "{date(date, '%Y-%m-%d %H:%M:%S %:::z')}\n"
2016-10-07 10:22:41 %:::z
From man date:
%:::z numeric time zone with : to necessary precision (e.g., -04, +05:30)