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

Re: Convert Date of Exported Log

From: Andy Levy <andy.levy_at_gmail.com>
Date: Fri, 21 Aug 2009 14:57:24 -0400

On Fri, Aug 21, 2009 at 14:36, Steven Kohus<steven.kohus_at_tcs.com> wrote:
> Hi all, I tried searching to see if someone previously posted about this, but I could not find any topics about it.
>
> For our project metrics, I need to export the Tortoise SVN log and gather the statistics to integrate along with bug tracking, project statistics (lines of code, files not updated in 6+ months, etc), and more for automatically generated project metrics each week.

Management by statistics is a bad way to go, but if that's what your
managers require, so be it.

> The issue I am having is with the revisions log, that contains each commit for the system, and the date is stored as a long number.  In Tortoise it seems dates are stored in UTC format, but exported as a number.  I am not sure how to convert this number to a date in UTC format or any other.   Does anyone know how to convert this?  Preferably in C# code, but any would be fine.

How are you reading this in the first place?

Subversion stores all dates in UTC. This isn't Tortoise, it's the
Subversion server libraries. Translation to local formats/timezone is
done by the client.

> An example date in the log file is:
> 1247253286220549
>
> Which is the date:
> 2009-07-10T19:14:46.220549Z
> (July 10, 2009 3:14:46 PM for my local time, the above time is the GMT time)
>
> I was guessing it was number of seconds or ticks from some specific date since the numbers continue to get higher with each commit, but nothing I tried seemed to work.  Thank you for any help you can provide.

It's the number of seconds since the Epoch - 1/1/1970 00:00:00Z. The
.NET Framework's Time & Date methods have lots of ways to work with
this.

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2386100

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2009-08-21 20:57:37 CEST

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.