Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6163599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T21:51:10+00:00 2026-05-23T21:51:10+00:00

I have one Calendar object which is as per the user’s time zone which

  • 0

I have one Calendar object which is as per the user’s time zone which may be PST etc, now i want to convert the same to GMT and retain the time i.e. is the calendar initially was set @ 00:00:00 at PST it should be converted to 08:00:00 after the conversion taking into consideration the time/date difference . Can someone provide me some help on this.

Appreciate the help in advance.

Thanks,

Vaibhav

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T21:51:11+00:00Added an answer on May 23, 2026 at 9:51 pm

    Just create a new Calendar in GMT, set the time in that calendar to the same as the original calendar, and you’re done:

    gmtCalendar.setTime(userCalendar.getTime());
    

    That should be fine, as the getTime() call returns the instant in time (i.e. a java.util.Date with no associated time zone).

    As ever though, if you’re doing any significant amount of date/time work in Java you should strongly consider using Joda Time instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an object graph which contains one object which fires events. I want
I have one application which uses the standard .NET forms authentication cookie, now I
I wanted my application to just have one TimeZone object which will be used
Actually I have two java classes of which one is an activity class. Now
I have two Ajax Toolkit calendar extenders. One of them is a start date
I have one std::list<> container and these threads: One writer thread which adds elements
I have one user who gets an error message when he closes his browser.
I have one aspx page with some controls. Also i have one DIV which
Ok, I'm officially stumped on this one. I have a GregorianCalendar object that I
I have a reporting page with a gridview and a calendar. When the user

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.