Reply to post: Re: I have to admit

Family wrongly accused of uploading pedo material to Facebook – after US-EU date confusion in IP address log

Kubla Cant
Mushroom

Re: I have to admit

In the very early days of visual studio, the inbuilt date conversion functions had a habit of borking dates

Aaargh! I'd forgotten about that. It wasn't just Visual Studio. The MS run-time library had a function (cdate IIRC) that converted strings to dates. But it ignored the locale and based the conversion on a best-guess - if the leading digits were between 1 and 12, it assumed a US date, otherwise a European date, so "12-01-2000" was the beginning of December, but "13-01-2000" was mid-January.

VB6 silently used this function if you passed a variant or string where a date parameter was expected. Given the indiscipline of VB6 programmers, and the lack of decent analysis tools, it was impossible to eradicate from the code base. In the end I had to create something that patched the function when the run-time was in memory. Ugh!

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon