From 059f121ebaa198ee2b105981b7f4abb5d1d12010 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 18 Mar 2018 16:39:19 +0100 Subject: stats: Fix strftime typo, only save timestamp where needed --- lib/Travel/Status/DE/IRIS.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/Travel/Status') diff --git a/lib/Travel/Status/DE/IRIS.pm b/lib/Travel/Status/DE/IRIS.pm index 9d5eebd..44a96d7 100644 --- a/lib/Travel/Status/DE/IRIS.pm +++ b/lib/Travel/Status/DE/IRIS.pm @@ -188,7 +188,9 @@ sub get_with_cache { my $filename = $url; $filename =~ s{ ^ .* iris-tts/ }{}x; $filename =~ tr{/}{_}; - $filename = $self->{datetime}->strftime('%Y%m%d%H%%M%S_') . $filename; + if ( $filename =~ m{ fchg }x ) { + $filename .= $self->{datetime}->strftime('_%Y%m%d%H%M%S'); + } write_file( $self->{log_dir} . '/' . $filename, $content ); } -- cgit v1.2.3