• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Change date and time format

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have downloaded the source of Jforum and now I have to modify the date format used in JForm. I have seen this line:



In the GenericForumDAO.java class but I don't understand where the date format is defined ("dd/mm/yyyy hh:mm", for example).
Could someone help me?
Thanks, bye bye.
[originally posted on jforum.net by abdujaparov]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It checks for the systemglobals.properties / jforum-custom.properties.

The key within that properties is specifed by ConfigKeys.DATE_TIME_FORMAT. I assume that the string should contain something along with'date' or 'time' in it. You can check the systemglobals.properties if you find the value.

I suggest to not simple replace the value in the properties then, but rather add that key/value pair to the jforum-custom.properties. This file is always checked first, and overwrites the default values within the systemglobals.properties
[originally posted on jforum.net by Sid]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The value of this property is based on the "format string" used by the SimpleDateFormat class. The docs for this class describe the different abbreviations used in formatting dates fairly well. It even has a nice examples section. This doc is available here:

http://java.sun.com/javase/6/docs/api/java/text/SimpleDateFormat.html




[originally posted on jforum.net by monroe]
 
I'm so happy! And I wish to make this tiny ad happy too:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic