tags:

views:

45

answers:

2

Having just upgraded to a newer version of HtmlUnit (2.4), I've noticed certain tests are failing when comparing the output of asText. Looking into the differences, this is because dates (present on the page in the format 11/06/2010 00:00z) are being altered in the output to read 2010-06-11.

Has anybody else encountered this, and can anybody advise how to turn off this (seemingly undocumented) feature. It seems to take place when reading in the document - I can side by side compare a version of the page with format dd/mm/YYYY and a DomText object reading YYYY-mm-dd.

A: 

Hi, please use 2.8-snapshot from here, and advise.

Ahmed Ashour
A: 

The problem turned out to be one of what locale settings HtmlUnit was reporting to the server, which was using this to determine the date formatting. Setting a default locale on the server solved the issue.

Submonoid