Unverified Commit 52d6ad8f authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Traveling: perltidy

parent 57378c55
Loading
Loading
Loading
Loading
+12 −10
Original line number Diff line number Diff line
@@ -1750,16 +1750,14 @@ sub map_history {
		time_zone => 'Europe/Berlin'
	);

	if ( $filter_from )
	{
	if ($filter_from) {
		$filter_from = $parser->parse_datetime($filter_from);
	}
	else {
		$filter_from = undef;
	}

	if ( $filter_until )
	{
	if ($filter_until) {
		$filter_until = $parser->parse_datetime($filter_until)->set(
			hour   => 23,
			minute => 59,
@@ -2733,9 +2731,11 @@ sub add_intransit_form {
				  )
				{
					$station = $+{stop};

					# attempt to parse "07:08" short timestamp first
					$ts = $time_parser->parse_datetime( $+{timestamp} );
					if ($ts) {

						# fill in last stop's (or at the first stop, our departure's)
						# date to complete the datetime
						$ts = $ts->set(
@@ -2743,13 +2743,15 @@ sub add_intransit_form {
							month => $prev_ts->month,
							day   => $prev_ts->day
						);

						# if we go back in time with this, assume we went
						# over midnight and add a day, e.g. in case of a stop
						# at 23:00 followed by one at 01:30
						if ( $ts < $prev_ts ) {
							$ts = $ts->add( days => 1 );
						}
					} else {
					}
					else {
						# do a full datetime parse
						$ts = $parser->parse_datetime( $+{timestamp} );
					}