These codes tested in macOS and Linux both In windows you need regkey | cmd /c /v | or set command to replace export in UNIX terminal
Another things that important are the ENVs : GIT_COMMITTER_DATE and GIT_AUTHOR_DATE that need to be set before you commit your changes
If you want only change date with not any change at all add --no-edit
to your command
These codes for Linux and macOS