Change Hesk Style date format to AM/PM

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
Lisaweb
Posts: 94
Joined: Sun Sep 25, 2011 3:23 pm

Change Hesk Style date format to AM/PM

Post by Lisaweb »

Script URL:
Version of script: 2.7.0 beta 2
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution: time format change, hesk style time

Write your message below:

I really like the "Hesk style" time formatting - but how can I change it so it will display AM/PM instead of military time? Thanks!
- Lisa
mkoch227
Posts: 666
Joined: Wed Jul 04, 2012 3:37 pm

Re: Change Hesk Style date format to AM/PM

Post by mkoch227 »

If you want to use 12-hour time instead of 24-hour time, make the following changes to the "Time Format" setting:
  • Instead of 'H' for hours, use 'g' or 'G' (exclude quotes of course). g is "12-hour format without leading zero" and G is "12-hour format with leading zero"
  • Add 'a' at the end for 'am'/'pm', or 'A' at the end for 'AM'/'PM'.
  • Save and test.
A complete list of parameters can be found at http://php.net/manual/en/function.date.php
Mike, Lead Developer of Image HESK: A surprisingly simple, user-friendly and FREE help desk software with integrated knowledgebase.
Lisaweb
Posts: 94
Joined: Sun Sep 25, 2011 3:23 pm

Re: Change Hesk Style date format to AM/PM

Post by Lisaweb »

Thanks! I did that already, changed them to "j-M-Y g:ia" But it doesn't seem to affect the "Hesk Style" time stamp on the ticket list page.
mkoch227 wrote:If you want to use 12-hour time instead of 24-hour time, make the following changes to the "Time Format" setting:
  • Instead of 'H' for hours, use 'g' or 'G' (exclude quotes of course). g is "12-hour format without leading zero" and G is "12-hour format with leading zero"
  • Add 'a' at the end for 'am'/'pm', or 'A' at the end for 'AM'/'PM'.
  • Save and test.
A complete list of parameters can be found at http://php.net/manual/en/function.date.php
- Lisa
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: Change Hesk Style date format to AM/PM

Post by Klemen »

The "Hesk style" is used for date only, it doesn't have any effect on time.

If you want to modify the display of "submitted" and/or "last modified" columns in ticket list, set it to "date and time" then adjust the date/time format as suggested by Mike.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply