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

Re: <date> tag: format and timezone

From: Branko Čibej <brane_at_xbc.nu>
Date: 2003-05-22 19:47:40 CEST

etienne studer wrote:

>Hi
>
>1. I am not sure what mean the numbers after the 42 seconds...
><date>2003-04-30T10:01:42.349105Z</date>
>
Numbers after a decimal point are usually called a "fraction". In this
case, since there are six numbers, they indicate millionths of a second,
also called "microseconds".

>2. Do I always get back the UTC time in the <date> tag?
>
The time zone indicator is part of the time format, so you can determine
the UTC offset by parsing the timestamp.

>I appreciate your help.
>
>Best regards, Etienne
>
>
>
>
>>-----Original Message-----
>>From: Branko Cibej [mailto:brane@xbc.nu]
>>Sent: Montag, 19. Mai 2003 20:15
>>To: kfogel@collab.net
>>Cc: etienne studer; dev@subversion.tigris.org
>>Subject: Re: svn log: date and time with --xml
>>
>>
>>kfogel@collab.net wrote:
>>
>>
>>
>>>"etienne studer" <etienne.studer@canoo.com> writes:
>>>
>>>
>>>
>>>
>>>>Using 'svn log' without '--xml' gives me the correct time.
>>>>
>>>>
>>Using 'svn log'
>>
>>
>>>>with '--xml' gives me the GMT time. Does this mean that when
>>>>
>>>>
>>using the xml
>>
>>
>>>>format I have to know how many hours I am off GMT? Or is there
>>>>
>>>>
>>another way
>>
>>
>>>>how to get the local time?
>>>>
>>>>Using 'svn log' without the '--xml' option returns
>>>>'...2003-02-24 17:35:24 +0100...'. -> correct
>>>>
>>>>Using 'svn log' with the '--xml' option returns
>>>>'<date>2003-02-24T16:35:24.120656Z</date>' -> one hour off
>>>>
>>>>
>>>>
>>>>
>>>I think so -- there's no "--local-time" option.
>>>
>>>But, I wonder why we use GMT for one and localtime for the other?...
>>>
>>>
>>>
>>>
>>My guess would be that the XML format is supposed to be easily
>>parseable, so it uses the raw timestamp that comes from the repo. "svn
>>log", on the other hand, munges the timestamp into our human-readable
>>format, which uses local time by default. And I think the current
>>behaviour is correct. It is not "you" who must know the UTC offset, it
>>is whichever program is parsing the XML.
>>
>>--
>>Brane Čibej <brane_at_xbc.nu> http://www.xbc.nu/brane/
>>
>>
>>
>>
>
>
>
>

-- 
Brane Čibej   <brane_at_xbc.nu>   http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu May 22 19:48:00 2003

This is an archived mail posted to the Subversion Dev mailing list.

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