summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornetworkException <git@nwex.de>2025-06-25 02:33:23 +0200
committerBirte Friesel <derf@chaosdorf.de>2025-06-25 16:51:36 +0200
commit7cd9c86dcc80b24e86aaaa9624210330e310342f (patch)
tree33c9968e21a0b92f0b91d889ad2c67848d5b86ac
parent22244844cc15b80ff0b451e6201e3957992fe06e (diff)
Journeys->add: allow consecutive route stops at the same timestampHEADmain
This patch relaxes the route timestamp sanity checking introduced in 9e6728a3e14fbe48b7e7aa1d7c0ae2d4e79f0ece by allowing the same timestamp (usually minute accuracy) to occur multiple times for consecutive stops. This is common for trams, for example.
-rwxr-xr-xlib/Travelynx/Model/Journeys.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Travelynx/Model/Journeys.pm b/lib/Travelynx/Model/Journeys.pm
index 30f3179..7c92664 100755
--- a/lib/Travelynx/Model/Journeys.pm
+++ b/lib/Travelynx/Model/Journeys.pm
@@ -201,9 +201,9 @@ sub add {
$ts = $parser->parse_datetime( $+{timestamp} );
if ($ts) {
my $epoch = $ts->epoch;
- if ( $epoch <= $prev_epoch ) {
+ if ( $epoch < $prev_epoch ) {
return ( undef,
-'Zeitstempel der Unterwegshalte müssen streng monoton steigend sein (keine Zeitreisen und keine Portale)'
+'Zeitstempel der Unterwegshalte müssen monoton steigend sein (keine Zeitreisen und keine Portale)'
);
}
$station_data{sched_arr} = $epoch;