Jump to content

how to change the date format

Featured Replies

Posted

how to change the date format in ip.board

It gets set automatically depending on the locale of the user. Which has caused a lot of debate because it leads to craziness such as AM/PM being shown in some locales and 24 hour clock in others even though that's a personal preference rather than country specific. Personally I want all dates to be set to a global standard along the lines of "Tue, 23 Jun 2015 13:00" because it's at least completely unambiguous. Everyone will have an opinion on this one :) 

Anyway, @Mark was kind enough to knock up a plugin that allows some customization of the dates. I've just starting using it myself :) 

The string "%a, %d %b %Y" works greats with that plugin.

Actually, rereading the thread above I think something is wrong. If the board is supposed to show the date/time in the user's locale then it's not working. My locale is UK and I've tried on three browsers and all the dates on this board are showing in USA format. Can anyone confirm?

Reading again, it looks like the locale is hardcoded by the language pack and not detected at all. So the default language pack is USA so you get USA times. If you want UK times you have to create a UK language pack and then set the locale in that pack to UK and then the user has to manually pick the language pack (it didn't autoselect when I just tested it, it still used the default USA one).

  • Author

thank you for reply

actually I want normal format like dd/mm/yy 24h:m

so is this plugin working with the above format?

  • Author

I installed the plugin but it is not working properly

It only changes things like the date when you hover over something. Like if you hover over "3 minutes ago" or "just now".

Archived

This topic is now archived and is closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.