When using the svn-multi package together with \svnfiledate it returns

2011-10-05 22:18:31 +0200 (Wed, 05 Oct 2011);

Is there some way of customization to get the following only:

2011-10-05 22:18:31 Time zone;


I'm the author of svn-multi. There is currently no feature for this included in the package. I was planning to add something like this for a while and asked the question Handling different time zones here to get some help for the conversation. The code I posted there in my self-answer could be adapted to be used together with \svnfiledate, but I didn't found time to do this yet.

I'm not sure, but checking out all files under Subversion on the local machine should produce all dates in the local time zone. I so, you might have copied the files from a different machine.

Here now the code from the above answer of mine, adapted to \svnfiledate. It prints the following two test lines:

Wednesday 5th October, 2011 21:30 UTC
Wednesday 5th October, 2011 23:30 CEST
Wednesday 5th October, 2011 08:45 -1245

which is the current date in three different time zones. Note that compilation of the adapted date and time might take a while if the day boundary is crossed. This happens inside the datetime package I guess.

I might put this feature into svn-multi, either directly or as an own timezone package.


{$HeadURL: file:///tmp/svn/rep/sv.tex $}
{$LastChangedDate: 2011-10-05 23:30:45 +0200 (Wed, 05 Oct 2011) $}
{$LastChangedRevision: 2 $}
{$LastChangedBy: martin $}

    \expandafter\@getnumtz\the\numexpr 0#2\relax

        \expandafter\let\expandafter#4\csname getnumtz@#5\endcsname%



    % #1 = macro which receives result
    % #2 = year
    % #3 = month
    % #4 = day
    % #5 = hour
    % #6 = minute
    % #7 = second
    % #8 = original timezone
    % #9 = target timezone
    % Store date:
    % Get numeric timezones
    % Calculate resulting hour-minute combination (could be improved)
    \c@myhourminute=\numexpr (#5)*100+(#6) - \origtz + \targettz \relax
    \c@myhour=\numexpr \c@myhourminute / 100\relax% integer devision
    \c@myminute=\numexpr \c@myhourminute - \c@myhour*100\relax
        \advance\c@myhour by \m@ne
        \advance\c@myminute by 60\relax
        \advance\c@myhour by \@ne
        \advance\c@myminute by -60\relax
    % Check if the day boundary has been crossed and adjust day:
        \advance\c@mydatenumber by \m@ne
        \advance\c@myhour by 24\relax
        \advance\c@mydatenumber by \@ne
        \advance\c@myhour by -24\relax

\newcommand\myshowdate[7]{\formatdate{#3}{#2}{#1} \formattime{#4}{#5}{#6} #7}

    \converttimezone\myshowdate{\svnfileyear}{\svnfilemonth}{\svnfileday}{\svnfilehour}{\svnfileminute}{\svnfilesecond}{\svnfiletimezonehour \svnfiletimezoneminute}{#1}%






Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.