+
+>>>>> I use a script that does that and also sets up templates and tags
+>>>>> for a new item:
+
+ #!/bin/sh
+ set -u
+ set -e
+
+ if [ $# -ne 1 ]; then
+ echo usage: $0 pagename >&2
+ exit 1
+ fi
+
+ pagename="$1"
+
+ if [ -e "$pagename" ]; then
+ echo error: "$pagename" exists >&2
+ exit 1
+ fi
+
+ date=$(date)
+ echo '\[[!template id=draft]]' >> "$pagename"
+ echo "\[[!meta date=\"$date\"]]" >> "$pagename"
+ echo "\[[!tag draft]]" >> "$pagename"
+ git add "$pagename"
+ $EDITOR "$pagename"
+
+>>>>> -- [[Jon]]
+
+> A quick workaround for me to get modification times right is the following
+> little zsh script, which unfortunately only works for git:
+
+ #!/usr/bin/env zsh
+
+ set +x
+
+ for FILE in **/*(.); do
+ TIMES="`git log --pretty=format:%ai $FILE`"
+ MTIME="`echo $TIMES | head -n1`"
+
+ if [ ! -z $MTIME ]; then
+ echo touch -m -d "$MTIME" $FILE
+ touch -m -d "$MTIME" $FILE
+ fi
+
+ done
+
+> --[[David_Riebenbauer]]