Aaron Johnson Now with 50% less caffeine!

Posted
7 December 2007 @ 1pm

Tagged
JavaScript, work

Dates, Milliseconds, Java and Firebug

In Clearspace we store dates using their millisecond representation rather than as a full fledged date in database tables because we don’t want to have to worry about how each database represents dates, but that means that whenever you’re looking at a Clearspace database table, you see values like this:

1172822399000

instead of something like this:

2007-03-01 23:59:59.000

which makes debugging dates a little harder. Firebug and JavaScript to the rescue! Open Firebug, click into the console area and then type this:

new Date(1172822399000);

and then click ‘run’ and voila. You’ve got the date. Have I told you how much I love Firebug?


1 Comment

Posted by
Dawn Foster
9 December 2007 @ 11am

Every time I talk to someone about Firebug, I learn something new. I’ve been doing a bunch of behind the scenes work on Fast Wonder this weekend - moving hosts, additional pages, css tweaks, etc., and I’ve spent a bunch of time with Firebug. Definitely one of my favorite plugins.


Leave a Comment

Links: 12-4-2007 SQL: getting the count of the result of a derived table