Osticket: Due date timeset is displayed wrong

Created on 13 Jun 2017  路  2Comments  路  Source: osTicket/osTicket

Hi, i have some really weird problem.
snip-time

I'm running v1.10(901e5ea)
Everything is vanilla, besides the german de.phar package.

All times around the System are the same and match up, only when creating a ticket the 12h format is still shown. i tried the fix but it only made times double appear.

For reference the fix that i tried. #1103
Problem once "fixed" here #1060

here is a part of my _class.misc.php_ without making any changes.

$time = Misc::user2gmtime(mktime(0,0,0));
        ob_start();
        echo sprintf('<select name="%s" id="%s" style="display:inline-block;width:auto">',$name,$name);
        echo '<option value="" selected>'.__('Time').'</option>';
        for($i=23; $i>=0; $i--) {
            for ($minute=45; $minute>=0; $minute-=15) {
                $sel=($hr==$i && $min==$minute)?'selected="selected"':'';
                $_minute=str_pad($minute, 2, '0',STR_PAD_LEFT);
                $_hour=str_pad($i, 2, '0',STR_PAD_LEFT);
                $disp = Format::time($time + ($i*3600 + $minute*60 + 1), false);
                echo sprintf('<option value="%s:%s" %s>%s</option>',$_hour,$_minute,$sel,$disp);
            }
        }

time-2

Most helpful comment

I'm so dump.
Its working now, the error really was that hh:mm.
Thank you so much.

All 2 comments

Hello @Zuescho
Change 'Zeitformat' from 'hh:mm' to 'H:mm' then save your changes. Now retest and tell us what happens.

I'm so dump.
Its working now, the error really was that hh:mm.
Thank you so much.

Was this page helpful?
0 / 5 - 0 ratings