Menu

#95 Time changes when a reservation is edited.

closed
None
7
2012-07-20
2007-01-29
Bergman
No

I believe that someone here has an easy answer to my problem.

If I make a reservation with duration of 1.5 hours, and save it, everything works.

When I open it to edit it, the time changes to 1,5 hours, and if I hit save.. it will be booked as 1 hour.

Couldn't find an answer to this comma-dot problem..

Discussion

  • John Beranek

    John Beranek - 2007-02-06

    Logged In: YES
    user_id=71843
    Originator: NO

    Inserting the following at line 46 of edit_entry_handler.php, just before "if( $enable_periods ) {" should work:

    Support locales where ',' is used as the decimal point

    $duration = preg_replace('/,/g', '.', $duration);

    John.

     
  • John Beranek

    John Beranek - 2007-02-06

    Logged In: YES
    user_id=71843
    Originator: NO

    Oops, the line should be:

    $duration = preg_replace('/,/', '.', $duration);

    Should've tested it first really...

    John.

     
  • Bergman

    Bergman - 2007-02-08

    Logged In: YES
    user_id=1434556
    Originator: YES

    Thank you for your answer.

    This solution did not work. After the change the system iddles (just a blank page) when editing a reservation.

     
  • Bergman

    Bergman - 2007-02-08

    Logged In: YES
    user_id=1434556
    Originator: YES

    Oops. It was I who made the mistake. Your solution was excellent. Thank you.

    I saw a few other people looking for this same solution, so thank you.

    :e

     
  • Jason

    Jason - 2010-01-25

    I see this change in my edit_entry_handler.php but I am still having the same problem.

    If the duration of a reservation is set for 1.7 hours and I edit the description and then save then the duration changes to 1 hr as opposed to saving the correct value.