Skip to main content


Showing posts from March, 2006

A list of US 'time zone IDs' for use with java.util.TimeZone

If you program in Java and have to convert dates and times between different timezones then you will know that the Date, Calendar & TimeZone objects of the java.util package are the way to go.

The JavaDoc for java.util.TimeZone mentions that you can use a 'time zone ID' of "America/Los_Angeles" to get the US Pacific Time. It doesn't give examples of any other time zone ID, so here is a list of the standard US time zone IDs:

AreaAbbrevZone NameEastern TimeESTAmerica/New_YorkCentral TimeCSTAmerica/ChicagoMountain TimeMSTAmerica/DenverPacific TimePSTAmerica/Los_AngelesAlaska TimeASTAmerica/AnchorageHawaii-Aleutian TimeHSTAmerica/Adak
(Table sourced from Statoids: Time Zones of the United States.)

Technorati Tags: , , , , ,

Never forget to attach a file to an email with the AttachmentRemember Thunderbird extension

AttachmentRemember is a rather nifty Thunderbird extension checks your outgoing email message for words that indicate that you might have wanted to attach a file to your email before you sent it.

So the message "Please see the attached file" would trigger if there was no attachment (once you add the keyword "attach" to the extension).

Talk about saving face in the work place.

Technorati Tags: , , , ,

Surely software developer magazines doomed for failure?

There is an interesting post from Eric Sink regarding the eventual death of developer magazines.

I used to subscribe to a couple of software development magazines, EXE was one of those - an excellent magazine that I would probably still subscribe to. It was bought out by Dr. Dobbs and was killed off as soon as it was bought.

Since 2000 I've not referred to one magazine for any help in software development, why bother when there is so many fantastic resources on the net?

Technorati Tags: ,

Resetting a PostgreSQL sequence

To reset a sequence so that the next time it's used it returns 1 run the following SQL:

select setval('my_sequence_sq1', 1, false);

The first parameter is the sequence name to set the value of, the next is the value to set it to, and the third field is whether the sequence should return this value or the next increment when it is used next.

For the official documentation please read chapter 9.12. Sequence Manipulation Functions from the PostgreSQL 8.0.7 Documentation.

Technorati Tags: , ,