Skip to content

Commit

Permalink
'#1337 Some datetime column recognition improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickdalla committed Feb 15, 2024
1 parent 33d1fa7 commit eed970d
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ SkypeReport.TransferCount=Transfer Count:\
SkypeReport.TypeDescr=Type Description
SkypeReport.UserData=User Data:
SkypeReport.Value=Value
SQLite3TableReader.DateFormat=MM/dd/yyyy_HH:mm:ssz
SQLite3TableReader.DateFormat=yyy-MM-dd HH:mm:ssz
WhatsAppReport.AccountID=Account ID:\
WhatsAppReport.ChatContinuation=[Chat continuation...]
WhatsAppReport.ChatContinues=[Chat continues...]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ SkypeReport.TransferCount=Transfer Zähler:\
SkypeReport.TypeDescr=Typ-Beschreibung
SkypeReport.UserData=Benutzer-Daten:
SkypeReport.Value=Wert
SQLite3TableReader.DateFormat=MM/dd/yyyy_HH:mm:ssz
SQLite3TableReader.DateFormat=yyy-MM-dd HH:mm:ssz
WhatsAppReport.AccountID=Account ID:\
WhatsAppReport.ChatContinuation=[Chat-Fortsetzung...]
WhatsAppReport.ChatContinues=[Chat wird fortgesetzt...]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ SkypeReport.TransferCount=Recuento de transferencia:\
SkypeReport.TypeDescr=Tipo de Descripción
SkypeReport.UserData=Fecha del Usuario:
SkypeReport.Value=Valor
SQLite3TableReader.DateFormat=dd/MM/yyyy_HH:mm:ssz
SQLite3TableReader.DateFormat=yyy-MM-dd HH:mm:ssz
WhatsAppReport.AccountID=ID de la cuenta:\
WhatsAppReport.ChatContinuation=[Continuación del Chat...]
WhatsAppReport.ChatContinues=[Continuación del Chat...]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ SkypeReport.TransferCount=Numero trasferimenti:\
SkypeReport.TypeDescr=Tipo Descrizione
SkypeReport.UserData=Dati utente:
SkypeReport.Value=Valore
SQLite3TableReader.DateFormat=dd/MM/yyyy_HH:mm:ssz
SQLite3TableReader.DateFormat=yyy-MM-dd HH:mm:ssz
WhatsAppReport.AccountID=ID Account:\
WhatsAppReport.ChatContinuation=[Proseguimento della chat...]
WhatsAppReport.ChatContinues=[La chat continua...]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ SkypeReport.TransferCount=Arquivos transferidos:\
SkypeReport.TypeDescr=Tipo
SkypeReport.UserData=Dados do usuário:
SkypeReport.Value=Valor
SQLite3TableReader.DateFormat=dd/MM/yyyy_HH:mm:ssz
SQLite3TableReader.DateFormat=yyy-MM-dd HH:mm:ssz
WhatsAppReport.AccountID=ID do usuário:\
WhatsAppReport.ChatContinuation=[Continuação do chat...]
WhatsAppReport.ChatContinues=[Chat continua...]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.Map.Entry;

Expand All @@ -22,6 +23,7 @@
import org.xml.sax.SAXException;

import iped.parsers.util.Messages;
import iped.parsers.util.MetadataUtil;
import iped.properties.ExtraProperties;
import iped.utils.SimpleHTMLEncoder;
import iped.utils.tika.IpedMetadata;
Expand Down Expand Up @@ -189,6 +191,7 @@ public InputStream createHtmlReport(int maxRows, ContentHandler handler,

if (!dates.isEmpty()) {
for (Entry<String, ArrayList<String>> entry : dates.entrySet()) {
MetadataUtil.setMetadataType(entry.getKey(), Date.class);
tableM.set(entry.getKey(), entry.getValue());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import java.io.IOException;
import java.sql.Blob;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
Expand Down Expand Up @@ -276,7 +275,8 @@ protected String handleFloat(ResultSetMetaData rsmd, ResultSet rs, int col, Cont
// the
// value is a string representing a Long.
String datetext="";
if (rsmd.getColumnTypeName(col).equals("TIMESTAMP")) { //$NON-NLS-1$
if (rsmd.getColumnTypeName(col).equals("TIMESTAMP") //$NON-NLS-1$
|| rsmd.getColumnName(col).toLowerCase().contains("timestamp")) {
long longValue = rs.getLong(col);
if(rs.wasNull()) {
text = null;
Expand Down

0 comments on commit eed970d

Please sign in to comment.