summaryrefslogtreecommitdiff
path: root/index.pl
diff options
context:
space:
mode:
Diffstat (limited to 'index.pl')
-rw-r--r--index.pl12
1 files changed, 9 insertions, 3 deletions
diff --git a/index.pl b/index.pl
index c0b5ce5..e3d383d 100644
--- a/index.pl
+++ b/index.pl
@@ -232,11 +232,17 @@ sub make_infoboard_lines {
my $destination = $d->destination;
my $time = $d->time;
my $etr;
-
- my $dt_dep = $strp_full->parse_datetime($time)
- // $strp_simple->parse_datetime($time);
+ my $dt_dep;
my $dt;
+ if ( $d->can('datetime') ) {
+ $dt_dep = $d->datetime;
+ }
+ else {
+ $dt_dep = $strp_full->parse_datetime($time)
+ // $strp_simple->parse_datetime($time);
+ }
+
if ( ( $displayed_lines >= $no_lines )
or ( $d->can('is_cancelled') and $d->is_cancelled ) )
{