Kanchan Singh wrote:
when I execute in my local system it is giving me proper date but when this code is executing in a different production server then the date value is not constant it keeps on changing on the same day
Also, if the date difference is not big, say today is 17 and date changes to 18 or 16 , then it may be the problem with locale, otherwise you have to explain it little more. like what is the default locale of your production server ?, is the date correct there ? where you're executing this code ?