Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

ChrisDolan (2855)

ChrisDolan
  (email not shown publicly)
http://www.chrisdolan.net/

Journal of ChrisDolan (2855)

Friday March 23, 2007
08:40 PM

Window of opportunity

[ #32783 ]

I had a bug this week that I could reproduce but a colleague could not. He had written some test code to exercise the start/end dates of a web feature. At my recommendation, he used

DateTime::Format::MySQL->format_date(DateTime->now)

to generate a test date to put into the database, which we would then compare with MySQL's now() function. Unfortunately, I forgot to tell him to add the time_zone => 'local' argument to DateTime->now, so DateTime was using UTC whereas MySQL was correctly using the local timezone, CDT. Consequently, the test passed from midnight to 6pm when he was working but failed from 6pm to midnight when I was working.

D'oh.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.