Skip to main content
Inspiring
October 4, 2013
Answered

How can I change the calendar to Gregorian while using locale "th_TH"?

  • October 4, 2013
  • 1 reply
  • 452 views

We use the flasg.globalization.DateTimeFormatter to format our dates and it works like charm.

In thailand (locale th_TH) the date is shown like this 4/10/2556 which is correct because most of the people seems to use the buddhist-time. But unfortunatelly our client wants to display the gregorian-time for those pepole, too...

So I would like to know, how to get rid of this offset! Does someone has an idea?

Yours,

Uli

This topic is closed to new replies. Start a new post to keep the conversation going.
Correct answer niggeulimann

FInally the solution is very easy:

You can use "th_TH@calendar=gregorian" instead of "th_TH" while initilaizing the DateTimeFormatter!

1 reply

niggeulimannAuthorCorrect answer
Inspiring
October 10, 2013

FInally the solution is very easy:

You can use "th_TH@calendar=gregorian" instead of "th_TH" while initilaizing the DateTimeFormatter!