Hi Stefan,
For my purposes I want the offset format of ISO8601. I am aware that the
formatting of SubWCRev seems to use RFC3339, which is fine form my purposes.
Having looked at the code I can see that you use standard lib functions for
time conversion and formatting, so understand your position and agree that
this behaviour is down to the lib functions.
>From my perspective I get a different result than was expected due to the
result of $WCDATEUTC=%Y-%m-%dT%H:%M:%S%z$ containing time data from two
different bases.
Using a format of $WCDATEUTC=%Y-%m-%dT%H:%M:%S+0000$ gets me what I need.
I believe this to be relevant here:
"If a struct tm broken-down time structure is created or modified by
gmtime() or gmtime_r(),
it is unspecified whether the result of the %Z and %z conversion
specifiers shall refer to UTC or the current local timezone,
when strftime() is called with such a broken-down time structure."
http://pubs.opengroup.org/onlinepubs/009695399/functions/strftime.html
<http://pubs.opengroup.org/onlinepubs/009695399/functions/strftime.html>
It may be worth adding a note about this to
https://tortoisesvn.net/docs/nightly/TortoiseSVN_en/tsvn-subwcrev-keywords.html
Thanks for your help
Adam
On Saturday, 17 November 2018 08:21:00 UTC, Stefan wrote:
>
>
>
> On Monday, November 12, 2018 at 4:57:12 PM UTC+1, Adam Barnes wrote:
>>
>>
>> $WCDATEUTC=%Y-%m-%dT%H:%M:%S%z$
>> $WCDATE=%Y-%m-%dT%H:%M:%S%z$
>>
>
> You append %z also to $WCDATEUTC, so why are you surprised that it shows?
> The %z means "the offset from UTC in ISO8601 format; no characters if*
> time zone* is unknown". Meaning that %z shows the offset from your local
> time zone, no matter what time is passed to the strftime() function.
> Just don't add %z to the string and you're fine.
>
> Stefan
>
>
>
--
You received this message because you are subscribed to the Google Groups
"TortoiseSVN" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tortoisesvn/ceb68482-cd0f-4471-b016-9b3d0d7427de%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.