[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: SubWCRev: Replacement of $WCNOW=%d$ not as expected from strftime

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Mon, 08 Nov 2010 18:49:27 +0100

On 08.11.2010 09:17, Aust,Dirk wrote:
> Hello!
>
> I found an issues with the SubWCRev 1.6.11 Build 20210 64bit.
>
> When I create a template of the form:
>
> #define SVNDATE ($WCNOW=%y$ << 9 | $WCNOW=%m$ << 5 | $WCNOW=%d$)
>
> At least the last keyword is replace always with a leading ‘0’, today
> ‘08’ which causes the compiler to stop with an error because it
> interprets this as octal constant, not a decimal one. I expected the
> ‘%d’ to be replaced with a number 1…31.

Check the docs for strftime:
http://msdn.microsoft.com/en-us/library/fe06s4ak%28VS.71%29.aspx

%d : Day of month as decimal number (01 – 31)

But you can use %#d instead (see section "format code" on the linked
page above).

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2680010
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2010-11-08 18:49:42 CET

This is an archived mail posted to the TortoiseSVN Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.