From 469b6901e0f7078c0e9771ad6ab04c2402aa917e Mon Sep 17 00:00:00 2001 From: "git@daemon.de" Date: Mon, 17 Jun 2013 12:24:56 +0200 Subject: [PATCH] fixed bug in NOTEDB::pwsafe3 backend, it converted the date of a note entry into the wrong formatted timestamp. --- Changelog | 4 ++++ NOTEDB.pm | 2 +- NOTEDB/pwsafe3.pm | 5 +++-- README | 4 ++-- bin/note | 2 +- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Changelog b/Changelog index 25a9884..37fc8b7 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,7 @@ +1.3.15: + fixed bug in NOTEDB::pwsafe3 backend, it converted the date + of a note entry into the wrong formatted timestamp. +================================================================================ 1.3.14: fixed bug in NOTEDB::pwsafe3 backend, it used lockging on the database file for reading, which is wrong. diff --git a/NOTEDB.pm b/NOTEDB.pm index 61dfe2f..45badc0 100644 --- a/NOTEDB.pm +++ b/NOTEDB.pm @@ -10,7 +10,7 @@ package NOTEDB; use Exporter (); use vars qw(@ISA @EXPORT $crypt_supported); -$NOTEDB::VERSION = "1.36"; +$NOTEDB::VERSION = "1.37"; BEGIN { # make sure, it works, otherwise encryption diff --git a/NOTEDB/pwsafe3.pm b/NOTEDB/pwsafe3.pm index 8f0ec6f..b9163fc 100644 --- a/NOTEDB/pwsafe3.pm +++ b/NOTEDB/pwsafe3.pm @@ -3,7 +3,7 @@ package NOTEDB::pwsafe3; -$NOTEDB::pwsafe3::VERSION = "1.02"; +$NOTEDB::pwsafe3::VERSION = "1.03"; use strict; use Data::Dumper; @@ -355,7 +355,8 @@ sub _pwsafe3tonote { # # convert pwsafe3 record to note record my ($this, $record) = @_; - my $date = scalar localtime($record->{lastmod}); + my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($record->{lastmod}); + my $date = sprintf("%02d.%02d.%04d %02d:%02d:%02d", $mday, $mon+1, $year+1900, $hour, $min, $sec); chomp $date; my $note; if ($record->{group}) { diff --git a/README b/README index a8b18c2..cc3fa41 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -note 1.3.13 by Thomas Linden, 14/11/2012 +note 1.3.15 by Thomas Linden, 20/06/2013 ======================================= Introduction @@ -214,4 +214,4 @@ and I'll add you. Last changed ============ -14/11/2012 \ No newline at end of file +20/06/2013 diff --git a/bin/note b/bin/note index 945e980..f8150f7 100755 --- a/bin/note +++ b/bin/note @@ -144,7 +144,7 @@ $CONF = File::Spec->catfile($ENV{HOME}, ".noterc"); $USER = getlogin || getpwuid($<); chomp $USER; $TOPIC = 1; -$version = "1.3.14"; +$version = "1.3.15"; $CurDepth = 1; # the current depth inside the topic "directory" structure... $maxlen = "auto"; $timelen = 22;