You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Branko Čibej <br...@xbc.nu> on 2003/05/22 17:47:40 UTC

Re: tag: format and timezone

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" <et...@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   <br...@xbc.nu>   http://www.xbc.nu/brane/
>>
>>
>>    
>>
>
>
>  
>


-- 
Brane Čibej   <br...@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

Re: tag: format and timezone

Posted by Branko Čibej <br...@xbc.nu>.
kfogel@collab.net wrote:

>Branko Čibej <br...@xbc.nu> writes:
>  
>
>>>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.
>>    
>>
>
>If that's the case, which portion of the above timestamp indicates the
>time zone?  I think the "Z" indicates UTC?
>
Yes, 'Z' is the same as UTC+00:00. It's a symbold for the military
"Zulu" or "zero" time zone. A-M indicate positive offsets, N-X indicate
negative iffsets from UTC (in 1-hour increments). 'Z' is explicitly
allowed by ISO-8601 -- it's a handy shorthand for UTC.

-- 
Brane Čibej   <br...@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

Re: tag: format and timezone

Posted by kf...@collab.net.
Branko Čibej <br...@xbc.nu> writes:
> >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".

I think it was the "Z" that threw him off.

Nonetheless, I laughed out loud at your response :-).

> >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.

If that's the case, which portion of the above timestamp indicates the
time zone?  I think the "Z" indicates UTC?  (Had this been 'svn log'
instead of 'svn log --xml', *then* the timestamp would clearly
indicate an offset from UTC.  Excuse me, I mean Greenwich Mean Time.)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org