Login | Register
My pages Projects Community openCollabNet

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

Project highlights: :. Download .: :. Support .: :. FAQ .: :. Translations .: :. Donate .: :. Report Bug .:

tortoisesvn
Discussion topic

2020-03-13: This site is going to be decommissioned and shut down very soon. Please copy and archive any data you wish to keep ASAP

Back to topic list

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

Author steveking
Full name Stefan Küng
Date 2010-11-08 09:49:33 PST
Message 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.microsof​t.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

« Previous message in topic | 2 of 7 | Next message in topic »

Messages

Show all messages in topic

SubWCRev: Replacement of $WCNOW=%d$ not as expected from strftime "Aust,Dirk" <Dirk dot Aust at PERKINELMER dot COM> "Aust,Dirk" <Dirk dot Aust at PERKINELMER dot COM> 2010-11-08 00:17:37 PST
     Re: SubWCRev: Replacement of $WCNOW=%d$ not as expected from strftime steveking Stefan Küng 2010-11-08 09:49:33 PST
         RE: SubWCRev: Replacement of $WCNOW=%d$ not as expected from strftime "Aust,Dirk" <Dirk dot Aust at PERKINELMER dot COM> "Aust,Dirk" <Dirk dot Aust at PERKINELMER dot COM> 2010-11-08 23:21:09 PST
             Re: SubWCRev: Replacement of $WCNOW=%d$ not as expected from strftime simonlarge Simon Large 2010-11-09 02:25:38 PST
                 RE: Re: SubWCRev: Replacement of $WCNOW=%d$ not as expected from strftime jonathanoakley Jonathan Oakley 2011-08-25 08:25:27 PDT
                     Re: Re: SubWCRev: Replacement of $WCNOW=%d$ not as expected from strftime simonlarge Simon Large 2011-08-25 15:01:44 PDT
                         Re: SubWCRev: Replacement of $WCNOW=%d$ not as expected from strftime jonathanoakley Jonathan Oakley 2011-08-26 01:17:05 PDT
Messages per page: