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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T07:48:58+00:00 2026-05-14T07:48:58+00:00

For example, when I extract from a database a Date() variable, it contains a

  • 0

For example, when I extract from a database a Date() variable, it contains a date with “+04:00” shift.
According to my locale’s settings.
So, UTC time is “ourTime” MINUS 4 hours.

Then, a user tells where he/she is from. Now, we need to save his/her shift.
LET’S SAY it is -01:00.
And finally, this user tells us where’s he/she is heading, let’s say this place has a time shift of +05:00.

How do we save this town’s or place’s time shifts in the DB so that according to where he/she’s from
we could calculate the time difference with our current locale?
Also, date save light things, how do we work with them?

  • 1 1 Answer
  • 1 View
  • 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-14T07:48:59+00:00Added an answer on May 14, 2026 at 7:48 am

    You don’t.

    As long as you’re using java.util.Date objects (or java.sql.Date, or java.sql.Timestamp) the database will contain UTC time, that’s what java.util.Date holds internally.

    You need to format and/or parse these dates according to local timezone. Take a look at SimpleDateFormat for more information. Of course, if you have dates in the database that you manually parsed, then you may be SOL.

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

Sidebar

Related Questions

I want to extract from a connectionString (a string variable) the server and database
I need a regular expression to extract from two types of URIs http://example.com/path/to/page/?filter http://example.com/path/to/?filter
I want to extract the value between the apostrophes, for example from this string:
I need to extract data from my MySQL database into multiple text files. I
For example, I have some data source (probably, database) from where I need to
I am trying to extract the table from database and trying to open it
I want to extract some data from the database without refreshing a page. What
I need a SQL statement to extract those applicants from the database who have
I am trying to extract certain values from an xml document. In the example
For example: string = This is a link http://www.google.com How could I extract 'http://www.google.com'

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.