[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: Aust,Dirk <Dirk.Aust_at_PERKINELMER.COM>
Date: Tue, 9 Nov 2010 07:21:04 -0000

Thank you!
Now I found it and it works. But the strftime doc which is linked in the online help doesn't mention this. Would be helpful if this could be somehow added there.

Regards,
Dirk Aust

-----Original Message-----
From: Stefan Küng [mailto:tortoisesvn_at_gmail.com]
Sent: Montag, 8. November 2010 18:49
To: users_at_tortoisesvn.tigris.org
Subject: Re: SubWCRev: Replacement of $WCNOW=%d$ not as expected from strftime

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].
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2680361
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2010-11-09 08:21:14 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.