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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T20:10:59+00:00 2026-06-05T20:10:59+00:00

In my Postgresql database, I have a timestamp without time zone with this value

  • 0

In my Postgresql database, I have a timestamp without time zone with this value : "2012-06-15 17:49:46.423" (default datatype used by Hibernate).

If I format with SimpleDateFormat and this pattern "EEEE dd MMMM yyyy", SimpleDateFormat#format returns “jeudi 14 juin 2012”.

Why the result is not “vendredi 15 juin 2012” ?

French to English translation for non-french spoken :

"jeudi 14 juin 2012"    => "Thursday 14th of June 2012"
"vendredi 15 juin 2012" => "Friday 15th of June 2012"

Hibernate 3.6.8.Final
JSF 2.0
JBoss 5.1.0.GA
Java 6

Thanks.

  • 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-05T20:11:00+00:00Added an answer on June 5, 2026 at 8:11 pm

    After searching, it turns out that I had two main options. Either I set the time zone through Hibernate or JSF.

    Option 1 : Hibernate
    I could change access type to Property. So in the setter, I would adjust the timestamp value to the right time zone. Another solution would be to create a custom Hibernate User Type.

    Full details with code here : Mapping Dates and Time Zones with Hibernate, Part 2: Few Solutions

    Option 2 : JSF
    Last option, I either create a custom converter in JSF or more simply, I use the timeZone attribute of f:convertDateTime.

    This how I did it :

    <h:outputText value="#{row.date}">
        <f:convertDateTime pattern="EEEE dd MMMM yyyy" locale="fr_FR" type="date" timeZone="Europe/Paris" />
    </h:outputText>
    

    All my dates are correct now !

    Source (in french) : Comment utiliser le timezone du compensant JSF convertDateTime

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

Sidebar

Related Questions

I have the following table in my postgreSQL 8.3.14 database timestamp status 2012-03-12 19:15:01
I have a field in my postgres database using the time (without time zone)
I have a table in my postgresql 8.4 database like this: id(serial), event_type_id(id, foreign
I have a Spring application which uses Hibernate on a PostgreSQL database. I'm trying
I have a client that has a PostgreSQL database and he cannot remember the
I Have to get a movie from a PostgreSQL database that matches a given
i have latitude and longitude columns in location table in PostgreSQL database, and I
I am lost. I have localhost database (PostgreSQL) and I have to add port
Given SQL as an input, I have to query a PostgreSQL database and return
Background: I have a PostgreSQL (v8.3) database that is heavily optimized for OLTP. I

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.