in reply to Testing and database date functions

In order to be able to fully test this kind of code, my company uses a set_test_datetime function that sets up the database to think it is that day, and also sets the time in the libraries.

In this way, we can test for any date and any time, no matter when it is right now.

  • Comment on Re: Testing and database date functions

Replies are listed 'Best First'.
Re^2: Testing and database date functions
by relax99 (Monk) on Dec 09, 2004 at 19:56 UTC
    That would work great - exactly what I need. I thought about it, but the company I work at right now is ***fairly new*** to automated testing of its production Perl code. That may not find understanding with a lot of people, so I have to do my testing without effecting other people's ways of doing things.