monotone

Issue 217: Fail on dates with time zone indicator

Reported by joe 23, Oct 25, 2012

A rev with a date cert that has a time zone indicator will cause 
some operations, e.g. mtn head, to fail.

We have a checkin with a date with a trailing 'Z'. From 
http://en.wikipedia.org/wiki/ISO_8601 the 'Z' indicator looks valid.

This checkin was perhaps made with a very old version of mtn? Or 
some helper app? Will update this issue if and when I get the 
version info from the author of the rev.


Steps to reproduce the problem:
-------------------------------

1. mtn local kill_certs h: date
2. mtn cert h: date 2012-10-25T12:00:00Z (or 2012-10-25T12:00:00+08)
3. mtn head or mtn log


Expected result:
----------------
Normal output


Actual results:
---------------
mtn: misuse: unrecognized date (monotone only understands ISO 8601 
format)


Output of `mtn version --full`:
-------------------------------
fails on 1.0

works on 0.38

mtn list cert h: works on both

Comment 1 by joe 23, Oct 27, 2012

The revision author was using guitone 1.0-rc5 with mtn 1.0 on 
Ubuntu.

So maybe a guitone bug, or maybe an mtn bug, depends on how strict 
you want to be about the date format. But the trailing 'Z' did work 
in mtn 0.38.

Comment 2 by joe 23, Jan 15, 2013

Please consider increasing the priority of this issue and fixing it 
as soon as possible. 

Since the presence of this type of cert causes basic operations like 
head and log to fail, it's a vector for making things difficult for 
everybody.

Not only should mtn handle time zone indicators, but it should not 
completely fail if the time can't be parsed.

thanks

Comment 3 by joe 23, Jan 31, 2013

Another problem - bad dates also break exporting-to-git.

Comment 4 by Markus Wanner, Apr 22, 2014

Status: Accepted
Owner: markus

Comment 5 by Markus Wanner, Jun 2, 2014

I don't think monotone ever supported time zone designators, so I 
suspect that 'Z' got added by another tool.

In any case, I added support for those in rev 
57a4fd816143b0eb82b154f256ebba2af0bc67a7.
Labels: Type:Feature Request Type:Defect
Status: Fixed

Created: 9 years 9 months ago by joe 23

Updated: 8 years 2 months ago

Status: Fixed

Owner: Markus Wanner

Labels:
Type:Feature Request
Priority:Medium

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status