From 5f0f6b71b4219ca64b292a3775f3a0cceaf9c17c Mon Sep 17 00:00:00 2001 From: f1ori Date: Sun, 6 Dec 2009 21:54:32 +0000 Subject: [PATCH] * revert last commit, something is more broken than before * UTC timestamps and lastseen-properteries still needs some debugging git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6519 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/yacy/yacyPeerActions.java | 2 +- source/de/anomic/yacy/yacySeed.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/de/anomic/yacy/yacyPeerActions.java b/source/de/anomic/yacy/yacyPeerActions.java index 4104a1678..1a995f05e 100644 --- a/source/de/anomic/yacy/yacyPeerActions.java +++ b/source/de/anomic/yacy/yacyPeerActions.java @@ -97,7 +97,7 @@ public class yacyPeerActions { } // connection time - final long nowUTC0Time = DateFormatter.correctedUTCTime(); // is better to have this value in a variable for debugging + final long nowUTC0Time = System.currentTimeMillis(); // is better to have this value in a variable for debugging long ctimeUTC0 = seed.getLastSeenUTC(); if (ctimeUTC0 > nowUTC0Time) { diff --git a/source/de/anomic/yacy/yacySeed.java b/source/de/anomic/yacy/yacySeed.java index 4a7c79d14..6eba6d00d 100644 --- a/source/de/anomic/yacy/yacySeed.java +++ b/source/de/anomic/yacy/yacySeed.java @@ -213,7 +213,7 @@ public class yacySeed implements Cloneable { this.dna.put(yacySeed.IPTYPE, "∅"); // settings that can only be computed by visiting peer - this.dna.put(yacySeed.LASTSEEN, DateFormatter.formatShortSecond(new Date(DateFormatter.correctedUTCTime()))); // for last-seen date + this.dna.put(yacySeed.LASTSEEN, DateFormatter.formatShortSecond(new Date(System.currentTimeMillis() - DateFormatter.UTCDiff()))); // for last-seen date this.dna.put(yacySeed.USPEED, yacySeed.ZERO); // the computated uplink speed of the peer this.dna.put(yacySeed.CRWCNT, yacySeed.ZERO); @@ -518,7 +518,7 @@ public class yacySeed implements Cloneable { // because java thinks it must apply the UTC offset to the current time, // to create a string that looks like our current time, it adds the local UTC offset to the // time. To create a corrected UTC Date string, we first subtract the local UTC offset. - dna.put(yacySeed.LASTSEEN, DateFormatter.formatShortSecond(new Date(DateFormatter.correctedUTCTime())) ); + dna.put(yacySeed.LASTSEEN, DateFormatter.formatShortSecond(new Date(System.currentTimeMillis() - DateFormatter.UTCDiff())) ); } /** @@ -738,7 +738,7 @@ public class yacySeed implements Cloneable { // now calculate other information about the host newSeed.dna.put(yacySeed.NAME, (name) == null ? "anonymous" : name); newSeed.dna.put(yacySeed.PORT, Integer.toString((port <= 0) ? 8080 : port)); - newSeed.dna.put(yacySeed.BDATE, DateFormatter.formatShortSecond(new Date(DateFormatter.correctedUTCTime())) ); + newSeed.dna.put(yacySeed.BDATE, DateFormatter.formatShortSecond(new Date(System.currentTimeMillis() - DateFormatter.UTCDiff())) ); newSeed.dna.put(yacySeed.LASTSEEN, newSeed.dna.get(yacySeed.BDATE)); // just as initial setting newSeed.dna.put(yacySeed.UTC, DateFormatter.UTCDiffString()); newSeed.dna.put(yacySeed.PEERTYPE, yacySeed.PEERTYPE_VIRGIN);