11 Jun 2009, 15:01
Tags: , , ,
Comments Off

Timezone in Java

A customer just called asking why his ColdFusion sees the time as being UTC, while the rest of the system and his own tests seem to indicate that the system is properly set for Europe/Amsterdam. Apparantly, java (or at least Sun’s JVM 1.4.2_09-b05, which is bundled with ColdFusion MX 7) only checks the system variable TZ to see which timezone it’s in. Since ColdFusion is started from initscript, this variable is not set yet. It’s in nearly the last of the init scripts.

So we had to add the following line to the initscript, somewhere near the beginning, to make sure ColdFusion uses the correct timezone:
export TZ="Europe/Amsterdam"

Thanks Geoff Mottram for pointing it out to me.

Tags: , , ,

 
  • Search


  • Calender

    June 2009
    M T W T F S S
    « May   Jul »
    1234567
    891011121314
    15161718192021
    22232425262728
    2930  
  • Twitter

    Powered by Twitter Tools

  • RSS Delicious feed

  • Archives