The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

Date/Time setting app

I'm currently setting up some test databases in our application.  The data needs to be entered in a time sequence that spans a period of months: enter a vehicle on June 1, inspect it on June 2, license it on June 10, perform an oil change on July 15, etc., etc.

I could change my computer's date/time but I do also need to keep track of e-mail etc. while I'm doing this (I only have one pc at my disposal).

What I'm really looking for is an application that can be a "shell" around a second application and fool it into thinking it is looking at the Windows date/time setting when it's really looking at a "fake" date/time setting.

Anyone know of anything like this?  Would it be horrendously difficult to develop something like it?
Karl Perry Send private email
Wednesday, January 05, 2005
You probably want to be able to pass in a data and time stamp instead of taking it from the system data and time. This will allow you to set your test data directly.
son of parnas
Wednesday, January 05, 2005
"Date" - not "data".

No, that's not what I want.  I want to take the app that my developers wrote, unchanged, and wrap a date/time setting app around it.  Passing in a parameter would require that every time a date/time setting is saved, the app would have to go through some code to determine whether a date/time parm was passed in or whether it should get it from Windows.

Thanks, though.
Karl Perry Send private email
Wednesday, January 05, 2005
If you have the source to this app it seems the simplest thing to do would be to change all date request calls to go to a utility library function you write instead of the system.  Normally it asks the system for the date but if you're in test mode then it feeds it the date you want.

If that's not acceptable for some reason then I think you're going to need something that does API hooking similar to what's described in this article:

I don't know of any existing tool although a quick search reveals that "date crackers" used to avoid time expiration dates on trial software might be what you want.  Some of them reset the whole system time but there may be one out there that can do it on an application basis.
Doug Send private email
Wednesday, January 05, 2005
>  "Date" - not "data".

So very sorry.

> No, that's not what I want.

Yes, but that's what you should do. Pass it in every time then there's no decision. If such a change would require a lot of changes then consider changing your code so it is only done in one place. Having magically set fields sound good at first, but it breaks down for exactly the kind of reasons you are showing.
son of parnas
Wednesday, January 05, 2005

Your suggestion would make sense but for one thing: I don't have control of this app.  I'm a sales guy now, no longer a developer.  And to take my programming team off their other tasks to make this change only to benefit creation of a demo database would be a complete waste of their time.

I'll look at the article referenced by another poster and see if I can glean any information there.
Karl Perry Send private email
Wednesday, January 05, 2005
How about using something like VMWare to run a test environment.  Then you could use a script to set the date-time on that environment w/o messing up your main system.
D. Lambert Send private email
Wednesday, January 05, 2005

Interesting.  I'll look into that.
Karl Perry Send private email
Wednesday, January 05, 2005
I think I'd revisit your original premise. Can you really work on e-mails while at the same time you are setting up test data? Why not go into 'test data setup' mode for, say, a two hour period. Have your PC set to the required date/time during this period and only do test data setup to the exclusion of all else. Most e-mails can wait for a couple of hours.
Mike Green Send private email
Thursday, January 06, 2005
Ummm, if I had a scheduling application that only allowed me to enter in the real date and time I'd quickly find it was pretty pointless.

Surely you can enter events for any date and time.  If its the recording of actual work done on a particular day (which should be in real time), I'd be interested to know how any testing of this had happened up to now.  But even so, I'd expect the application to allow me to override the date when entering data as it may not be possible to enter it in real time.
Simon Lucy Send private email
Thursday, January 06, 2005
There are some inadequacies (sp?) in this application - yes.  There are quirks in all apps.

There are many places in the app (I'll say here too that I had no hand in spec'ing or writing this app: I came to work here recently and the app is 10+ years old) where I can set a date.  However, if I forget to set that date in even one place during data entry of a complex screen then I'm stuck with garbage data.

The app is designed to be used by our customers in real time, and during normal use our customers seldom have problems with date entry because they almost always accept the default of "today".  If I can change the computer's date, add some data, change the date forward, add more data, etc. then it makes my job of banging in sample data a whole lot simpler and it allows me to use the app as it was designed to be used.

Regarding the e-mail thing: that is just one thing.  There are many, many real-time operations that happen in a Windows machine these days and I really don't like setting my own computer's date back for fear that a virus scanner or something else may get screwed up. Windows is just too fragile ...

I solved the problem for now by scrounging up an old PIII laptop and I'm using it for data entry.  I also downloaded the v5 beta of VMWare and tonight I'll install WinXP "in" it to see if that works.  Does anyone here know whether VMWare allows an independent date to be set in each virtual machine?
Karl Perry Send private email
Thursday, January 06, 2005
In most VM software you can set a config option to make the installed OS use the same date/time as the host machine.  Usually it's not a bad idea, but in your case you'd clearly want to unset that option.  I think you'll be fine then.
Aaron F Stanton Send private email
Thursday, January 06, 2005
Gat a second machine to test on. Old clunkers are cheap and mimic your clients' :-))

We have exactly the same problem. Set a future date and all your Outlook appointments trigger at once :-((
Thursday, January 06, 2005
I would generate a test database with the date/time that the application chooses and then write a program (or use a hex editor) to tweak the raw database file to change the date/time to the values that you want.
Monday, January 10, 2005

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
Powered by FogBugz