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 8885867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:25:01+00:00 2026-06-14T21:25:01+00:00

I have a soap client request that I need to convert the date response

  • 0

I have a soap client request that I need to convert the date response into EST time.

On my screen, I selected: 11:45am and I want to save 11:45 am in the database.

But the SOAP request comes in as:

2012-11-24T16:45:00.000Z

In java code, the date prints as:

Sat Nov 24 11:45:00 EST 2012
…

Yet we make another web-service call which eventually saves to the database (SQL Server):
2012-11-24 16:45

Calendar incomingWebServiceCalendarObject = fromWebService.getDateTime()

Calendar outgoingWebServiceCalendarObject = incomingWebServiceCalendarObject;
webServiceBean.setDateTime(outgoingWebServiceCalendarObject);

…
How can I save as 2012-11-24 11:45?

Also, here is the gregorian calendar:

java.util.GregorianCalendar[time=1353775500000,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=”America/New_York”,offset=-18000000,dstSavings=3600000,useDaylight=true,transitions=235,lastRule=java.util.SimpleTimeZone[id=America/New_York,offset=-18000000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=2,startDay=8,startDayOfWeek=1,startTime=7200000,startTimeMode=0,endMode=3,endMonth=10,endDay=1,endDayOfWeek=1,endTime=7200000,endTimeMode=0]],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2012,MONTH=10,WEEK_OF_YEAR=47,WEEK_OF_MONTH=4,DAY_OF_MONTH=24,DAY_OF_YEAR=329,DAY_OF_WEEK=7,DAY_OF_WEEK_IN_MONTH=4,AM_PM=0,HOUR=11,HOUR_OF_DAY=11,MINUTE=45,SECOND=0,MILLISECOND=0,ZONE_OFFSET=-18000000,DST_OFFSET=0]

…

I did the following and this appears to work, is this a proper approach, what is the code trying to accomplish based on my requirement?

final long offset = this.secondaryScheduleTime.getTimeInMillis() + TimeZone.getTimeZone("EST").getRawOffset();
final Date estTime = new Date(offset);
final Calendar c2 = Calendar.getInstance();
c2.setTime(estTime);
  • 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-06-14T21:25:02+00:00Added an answer on June 14, 2026 at 9:25 pm

    Your initial SOAP request is coming in as UTC (.000Z is your timezone information), after which your Calendar object converts it to Eastern time ,zone=sun.util.calendar.ZoneInfo[id="America/New_York"... for display and then you are persisting the original SOAP information to your database.

    What you don’t show is how you are persisting your database and with which timestamp.

    I can think of only 2 situations you have going on:

    1. Your database is in UTC only and no timezone information is saved. This means that each call to/from your DB is always UTC and timezones are left up to your code.
    2. Your database saves timezone info via the Timestamp datatype, but you are sending the UTC information from your SOAP request to your database, not your local Calendar object.

    I think the solution you provided satisfies #2 on the list above, but again, without seeing any other details I think it will be hard to determine for sure.

    I would suggest dropping some break points and stepping through your code to see exactly when/where your date objects are being created, and with what information.

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

Sidebar

Related Questions

I have a bunch of generated SOAP client stubs that differ between WSDL versions.
I have a complex RIA client that communicates with a WCF SOAP web service,
I have a SOAP result set that the nuSoap extension has turned into a
I have a Silverlight client that I need to call a web service. The
I have to create a PHP SOAP client that sends leads, but I have
I need to have this node in my SOAP Request (using 1.1): <CredentialsHeader xmlns=http://www.url.com/Services/P24ListingService11
I have been writing a SOAP client application in C++ on Ubuntu using OpenSSL
we have a public asmx service that is accessed by our clients through SOAP
I have a SOAP service, the request and responses work as expected with good
hi i have a flow in mule like this <flow name=MuleService> <vm:inbound-endpoint path=ms exchange-pattern=request-response

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.