PrettyTime gives me a offset of 9 hrs

Splash Forums PrettyTime Users PrettyTime gives me a offset of 9 hrs

This topic contains 1 reply, has 2 voices, and was last updated by  Lincoln Baxter III 5 years, 10 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #17999

    yverma
    Participant

    I am getting a timestamp from database and using prettytime to know how much ago the record was inserted in database.

    Date dt = (java.util.Date)rsQuery.getTimestamp(“insert_tz”);

    PrettyTime p = new PrettyTime(java.util.Locale.US);

    System.out.println(p.format(dt));

    The result is always an offset by 9 hrs. I mean if I inserted the record right now, Pretty time time will show 9 hrs ago

    Please help.

    Thanks

    Yogesh

    #21190

    This is because we currently do not support TimeZones by default. You would have to apply this calculation yourself. Otherwise, if you wanted to try to integrate timezones into PrettyFaces, that would probably help a lot of people!

    I’d be glad to help out.

    ~Lincoln

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

Comments are closed.