From 4919a87027c9f0501a636fbea0cbd2a6510afb38 Mon Sep 17 00:00:00 2001 From: Charles McGarvey Date: Sun, 24 Apr 2022 14:07:06 -0600 Subject: [PATCH] improve dumping Time::Piece objects --- lib/File/KDBX/Util.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/File/KDBX/Util.pm b/lib/File/KDBX/Util.pm index 9fe9a9e..3141c3f 100644 --- a/lib/File/KDBX/Util.pm +++ b/lib/File/KDBX/Util.pm @@ -223,7 +223,8 @@ sub dumper { # boolean $str =~ s/bless\( do\{\\\(my \$o = ([01])\)\}, 'boolean' \)/boolean($1)/gs; # Time::Piece - $str =~ s/bless\([^\)]+?(\d+)'?,\s+\d+,?\s+\], 'Time::Piece' \)/Time::Piece->new($1)/gs; + $str =~ s/bless\([^\)]+?(\d+)'?,\s+\d+,?\s+\], 'Time::Piece' \),/ + "scalar gmtime($1), # " . scalar gmtime($1)->datetime/ges; print STDERR $str if !defined wantarray; push @dumps, $str; -- 2.45.2