diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2025-07-06 12:31:57 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2025-07-06 12:31:57 +0200 |
commit | 3dcb6e1619672ba3a9cf63b5e2a67d378e19e20c (patch) | |
tree | 29a9f9245bb36ddf35149371a5b1c2fe448f6556 /lib | |
parent | 080b86667ae71968ad4c5650dbbe5b02d835c934 (diff) |
Revert "/journey/edit: datetime inputs"2.15.11
This reverts commit 02a6b9072d16c521142f04f5dd4a316aa269a5de.
DateTime inputs on the web are absolutely horribly broken as soon es they use
sub-minute accuracy (i.e., seconds). Switch journey edits back to %d.%m.%Y
%H:%M(:%S) to restore proper editing support. /journey/add and /checkin/add
retain their datetime pickers and will not support sub-minute accuracy.
Closes #272
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/Travelynx/Controller/Traveling.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Travelynx/Controller/Traveling.pm b/lib/Travelynx/Controller/Traveling.pm index 30090a0..6176415 100755 --- a/lib/Travelynx/Controller/Traveling.pm +++ b/lib/Travelynx/Controller/Traveling.pm @@ -2379,12 +2379,12 @@ sub edit_journey { if ( $self->param('action') and $self->param('action') eq 'save' ) { my $parser_sec = DateTime::Format::Strptime->new( - pattern => '%FT%H:%M:%S', + pattern => '%d.%m.%Y %H:%M:%S', locale => 'de_DE', time_zone => 'Europe/Berlin' ); my $parser_min = DateTime::Format::Strptime->new( - pattern => '%FT%H:%M', + pattern => '%d.%m.%Y %H:%M', locale => 'de_DE', time_zone => 'Europe/Berlin' ); @@ -2489,10 +2489,10 @@ sub edit_journey { if ( $journey->{$key} and $journey->{$key}->epoch ) { if ( $journey->{$key}->second ) { $self->param( - $key => $journey->{$key}->strftime('%FT%H:%M:%S') ); + $key => $journey->{$key}->strftime('%d.%m.%Y %H:%M:%S') ); } else { - $self->param( $key => $journey->{$key}->strftime('%FT%H:%M') ); + $self->param( $key => $journey->{$key}->strftime('%d.%m.%Y %H:%M') ); } } } |