Thursday, December 13, 2007

Dates, Times bane of my existence

Seriously tired of trying to work out why my time and date stuff isn't working. It's not working.. and I can't work out how, unless I go to the site at the time it's broken. Herein lies the problem.. I then _break_ what's going to happen the next day.. at a different time.

Woe is me!

I've decided to take all the variables governing dates and times and stick them at the top.. then try and populate them with a variety of numbers, to see if I can replicate the error.

Anyone have any good ideas for dealing with this? Some sort of "fake time" tool?

OK.. wistful thinking I know...

BFN

2 comments:

Anonymous said...

Hi Jeni!

Hey, found some things and thought of you. You use Twitter. Right?

Maybe you already know of these and have them, but in case you don't here are some fun things for it that maybe might be helpful for ya. If not, well, just thinkin of ya. So here's 2 widgets that work with Twitter that you can use either on your myspace page, or on your blog (here):

http://www.widgetbox.com/widget/twidget

and

http://www.yourminis.com/minis/yourminis/podman/mini:twitter

Just thought those might be fun for ya! :)

Haha, you and David love that Twitter site :-)


Oh, and on your time & date thing, uhm, I'm not sure exactly what platform you are working with regarding the item you mentioned in this post, whether you're working with a WEB App, or a Windows App, but here's something that might be of interest to you.

Ok, this program is called "RUN as DATE". And what it can do is launch a program on windows as though it has been run at a certain date & time. All you do is run this thing 1st, then specify your app, and you can pick any date and run it. You can choose the TIME as well. The program will launch thinking it's the date you chose. Regardless of the current date & time, or anything on the pc's CMOS or system clock.

http://www.nirsoft.net/utils/run_as_date.html


Now if it's a windows app you're running, that's your ticket right there. If however it's a web app, there are different scenarios. If the app is getting the date & time off the server, then there's not much you can do, as far as your testing, unless you own it and its sitting next to you. The next scenario is that your app is pushing the date & time as a parameter from the client to the server in which case you don't need any of this, just POST the date & time in the form.

Next, if the app is getting the date & time from the client, you might try running Internet Explorer as the windows app that you launch with that Run As Date program! I've not tried that, but you could try it and see if that does anything for ya. If the date & time is somehow being read from the browser, then that utility I pointed you to, might just fool the browser into acting as if it's whatever date & time you put in there, and pass that on to your host.

Lastly, if the date & time data is being furnished by the server, and the server is elsewhere and unchangeable, you could for testing purposes install a little web server on your OWN pc there. MySQL too if need be. And then you could have both your browser client, and your server-side web app running right in your own little test bed right on your own pc. And then... you guessed it, start up the web server software using Run As Date!

The Run As Date utility I just gave ya is nice too because it can create a shortcut, that when clicked, will run with the particular time, date, and app you selected. So if you needed to use it in a command line system or have it run a set of things unattended, it can do that. :)

Ok! Hope that helps ya!

[Hey, go check-in on your myspace page. Will send ya something over on that!]

-SGC

Unknown said...

I think I'm going to put that "run as date" app to good use! The times/dates are actually on the server. The data and the server are in UTC, but the site shows everything as EST, and of course I am on PST.
The problem (I actually solved it Saturday night.. yeah I have no life.. *sigh*) was actually when I was transforming the "now date" and "tomorrow date" to get data out of the database, up until 6am instead of the day rolling over at 12am. I was prepending a 0 to a singe digit day, but not setting the date for a double digit day.. anyhow.. it's fixed!

Turns out the updates I'm sending live today fix it anyhow.. :S

That tool sounds extremely useful though, and would have made it much quicker for me to track down the bug!