Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Incorrect Time Format after Upgrade to 1.10

Hi guys,

I just recently upgraded from 1.9 to 1.10 (901e5ea). The upgrade went smoothly and everything is working perfectly, except for the time formatting.

Under Date and Time Options in Settings, I have no choice but to use 24 hour time (which is fine really). Both Locale Defaults options give me 24 hour time, and if I set it to advanced the am/pm marker shows up as a capital P (eg. 8:42 P instead of 8:42 pm or 8:42 am). I have the time format set as h:mm a. This shows true even on the preview as I type it in:

image

I'd really like to go back to 12 hour time if possible. Has anyone ran into this issue at all with 1.10?

Server Information
osTicket Version     v1.10 (901e5ea) — Up to date
Web Server Software     Apache/2.2.31 (FreeBSD) PHP/5.6.19 DAV/2
MySQL Version     5.5.33
PHP Version     5.6.19

PHP Extensions
gdlib     Used for image manipulation and PDF printing
imap     Used for email fetching
xml     XML API
xml-dom     Used for HTML email processing
json     Improves performance creating and processing JSON
mbstring     Highly recommended for non western european language content
phar     Highly recommended for plugins and language packs
intl     Highly recommended for non western european language content
fileinfo     Used to detect file types for uploads
APCu     Improves overall performance
Zend Opcache     Improves overall performance

PHP Settings

cgi.fix_pathinfo     "1" is recommended if AJAX is not working
date.timezone     America/Toronto
Database Information and Usage
Schema     osTicket (localhost)
Schema Signature     98ad7d550c26ac44340350912296e673
Space Used     107.66 MiB
Space for Attachments     66.87 MiB
Timezone     EDT (Interpreted as America/New_York)

Thanks!
Adam

Comments

  • Time Format: hh:mm a
    Date and Time Format: MM/dd/y h:mm a
    Day, Date and Time Format: EEE, MMM d y h:mm a

  • edited July 27
    My date and time format settings are similar to what you've posted now, however I still get the same results for the am/pm marker. It shows up as a capital P instead of either am or pm.

    image

    Thanks!
    Adam
  • Try removing the space between the ':mm' and the 'a' making it ':mma'.
  • Hi Kevin. I've actually tried that, and the P is still displayed.

    Thanks,
    Adam
  • edited July 28
    I got around it for now by modifying class.format.php and switching the marker in the $codes array under the getStrfTimeFormat function from %P to %p. This produces an uppercase am/pm marker, but at least I've got the format I'm looking for.

    Here's the diff of class.format.php:
    <             '%P' => 'a',
    ---
    >             '%p' => 'a',

    Still haven't fixed the root of the problem, but at least this is a passable work around for now.

    Thanks!
    Adam
Sign In or Register to comment.