Date increment issue due to day light saving

The date increment worked fine until date reached 25/10, which is DLS change date.

/bin/date --date="091025 1 day" +%y%m%d;

the output is 091025

Is this a bug or something missing from the code !

Not a bug. It's giving the correct answer. It is setting its time to the first second of Oct 25, then it is adding 24 hours to the time. However Oct 25 is 25 hours long.

Thanks perderabo for the response.
25 hrs in a day.. Does that mean that unix/linux calculate dates based on GMT/UTC.

what can be the workaround to overcome DLS dates.

Regards

No, UTC never has 25 hour days. You need to have Daylight Savings Time to see one 23 hour and one 25 hour day per year. Switching the time zone to GMT might fix it. Or maybe you can set the time to noon rather than midnight...then 24 hours should always be enough. Our faq section has my datecalc script which is another option and that is what I would use.