A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
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);
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
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-2014