My server is in US and I am accessing the application in India through
web browser, in that case whatTimeZone.getDefault()will return?
If it returns Time Zone based on India on basis of what it will return?I have changed in control panel setting to different locale and
different time zone of the system even though it is not changing based
on my settings.I have written the code as fallows…
def dateFormat = DateFormat.getDateTimeInstance(DateFormat.DEFAULT,DateFormat.DEFAULT,Locale.getDefault())
dateFormat.setTimeZone(TimeZone.getDefault())
It’s going to return the timezone of the JVM TimeZone.getDefault() is executed on. So if the application is running on a server in India, it will be something like “Asia/Calcutta”.