File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
REST with Spring (video course)
this week in the
Java in General
How to get Pacific Date from GMT ?
Joined: Mar 20, 2003
Mar 27, 2003 17:32:00
I have a calendar with GMT date.
I need to get the Pacific(-8) time equivalent for the HOURS field.
How can I do that ?
Joined: Oct 08, 2001
Mar 28, 2003 11:32:00
Look into javadocs for
class. Your code might look something like this:
TimeZone tz = TimeZone.getTimeZone("EST"); TimeZone.setDefault(tz); Calendar rightNow = Calendar.getInstance(); int hour = rightNow.get(Calendar.HOUR_OF_DAY); int min = rightNow.get(Calendar.MINUTE); int day = rightNow.get(Calendar.DAY_OF_WEEK);
I agree. Here's the link:
subject: How to get Pacific Date from GMT ?
DST issue with GregorianCalendar
How can I get the midnight GMT time
Help with System Time
Date vs Calendar
java.util.Date on different JVMs on different timezones
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015