Log in or register to post comments

VWS Java Sample

December 30, 2013 - 1:40pm #1

Dear Vuforia,

In the VWS Java Sample code, I found the following line:

request.setHeader(new BasicHeader("Date", DateUtils.formatDate(new Date()).replaceFirst("[+]00:00$", "")));

The DateUtils.formatDate(new Date()) produces a RFC 1123 string which is exactly what needed. So what is the purpose of replaceFirst("[+]00:00$", "")?

Happy New Year.

Best Regards,

Peng

VWS Java Sample

December 30, 2013 - 1:56pm #2

Good question. Try removing the replaceFirst() call and see what you get. I assume that the developer had a good reason for trimming the date string in that way.

Log in or register to post comments