I am using GMT+1 for uk time zone in my code. My problem is for daylight saving it will not work. Can i use BST in place of that so that it will automatically take care of the daylight saving.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No, you should use the time zone identifier of “Europe/London” as that is the time zone observed by the UK. It should then be accurate for both standard time and daylight saving time.
(As a general note, if you’re doing any significant date and time work in Java, it’s worth checking out Joda Time – a much nicer API than the built-in one.)