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 ]

jdavidb (1361)

jdavidb
  (email not shown publicly)
http://voiceofjohn.blogspot.com/

J. David Blackstone has a Bachelor of Science in Computer Science and Engineering and nine years of experience at a wireless telecommunications company, where he learned Perl and never looked back. J. David has an advantage in that he works really hard, he has a passion for writing good software, and he knows many of the world's best Perl programmers.

Journal of jdavidb (1361)

Thursday May 11, 2006
10:38 AM

Not all timezones are negative

[ #29588 ]

One of my older programs stripped datestamps in its input of a mysterious "-0400" string. According to the comments, I thought this was the timezone offset, but wasn't sure. Now I know a little more. :)

Thankfully I didn't write the code to assume that the offset was always -0400, so it's worked seamlessly through several daylight saving time changes. But some time recently, somebody reconfigured the machine generating the input to be on UTC time. Good idea, but now the offset is +0000, and the code broke. :)

I don't usually have to think about writing code for the other hemisphere, but in this case it might have helped.

(What would've helped more would've been to use Oracle TIMESTAMPS with time zones to store the data rather than throwing that part away. But I suspect nobody cares at this point in time but me.)

I actually work in UTC time myself. I deal with folks in the four primary continental U.S. timezones: Pacific, Mountain, Central, and Eastern. Having the times in UTC reminds me to always convert. And makes me look like a complete geek to everyone I know, which is good. :)

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.