jaipandya / harviewer

Automatically exported from code.google.com/p/harviewer
0 stars 0 forks source link

iso date format validation fails #33

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. use a har file that has an iso date format with ms (eg. 
2011-01-21T16:03:08.340000) 
2.
3.

What is the expected output? What do you see instead?
It should have worked being a fraction of a second. Instead the validation 
fails and the resulting view is not consistent.

What version of the product are you using? On what operating system?
Latest rev trunk

Please provide any additional information below.

Please attach a HAR file that can be used to reproduce the problem.

Original issue reported on code.google.com by phobouli...@gmail.com on 21 Jan 2011 at 4:57

GoogleCodeExporter commented 9 years ago
Not iso date format with ms. ISO date with fraction of a second. 

Original comment by phobouli...@gmail.com on 21 Jan 2011 at 5:00

GoogleCodeExporter commented 9 years ago
Date time fields are validated against the following reg expression:
/^(\d{4})(-)?(\d\d)(-)?(\d\d)(T)?(\d\d)(:)?(\d\d)(:)?(\d\d)(\.\d+)?(Z|([+-])(\d\
d)(:)?(\d\d))/;

Complete date plus hours, minutes, seconds and a decimal fraction of a second 
and time zone designator is expected.

So, valid date is e.g.:
"2010-01-02T14:51:01.186+01:00"

In your case it would be something like as follows:
"2011-01-21T16:03:08.340000+00:00"

Does this solve your problem?

Honza

Original comment by odva...@gmail.com on 24 Jan 2011 at 3:04

GoogleCodeExporter commented 9 years ago
Resources:
- http://groups.google.com/group/http-archive-specification/web/har-1-2-spec
- http://www.w3.org/TR/NOTE-datetime

For example:
* startedDateTime [string] - Date and time stamp for the beginning of the page 
load (ISO 8601 - YYYY-MM-DDThh:mm:ss.sTZD, e.g. 2009-07-24T19:20:30.45+01:00).

Honza

Original comment by odva...@gmail.com on 24 Jan 2011 at 3:06

GoogleCodeExporter commented 9 years ago
Indeed you are correct Honza. Sorry for the hassle. You can close this.

Original comment by phobouli...@gmail.com on 26 Jan 2011 at 1:52

GoogleCodeExporter commented 9 years ago
Thanks for the update!
Honza

Original comment by odva...@gmail.com on 26 Jan 2011 at 1:58