Need Help to figure out date behavior

Here is my code

String currentdate = new String();

Calendar calender = Calendar.getInstance();

currentdate = calender.get(Calendar.YEAR) + "-" +

calender.get (Calendar.MONTH) + "-" +

calender.get(Calendar.DAY_OF_MONTH) ;

My question is I have tested this code on 3 different windows machines,but for some reason

it gives me june as in month where as its july.

I know that day light saving does impact one hour but whats this?( month time saver?..:-).....)

please help...

[538 byte] By [khalidali63] at [2007-9-26 1:14:15]
# 1
From different places in the api-docu:"Month value is 0-based. e.g., 0 for January"
ipreuss at 2007-6-29 0:31:11 > top of Java-index,Core,Core APIs...
# 2
Hi, I think i know the answer , Can u plese send the code or elaborate it more?vidya
vidyapd at 2007-6-29 0:31:11 > top of Java-index,Core,Core APIs...
# 3
Hi , when u r retriving month at that time just add 1 to that variable of month . and then display it .U have to do this bcoz month in calender r from 0 to 11 not from 1 to 12 hope this will help u ...
vidyapd at 2007-6-29 0:31:11 > top of Java-index,Core,Core APIs...