[
https://issues.apache.org/jira/browse/COUCHDB-1405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13204417#comment-13204417
]
André Bögge commented on COUCHDB-1405:
--------------------------------------
We use a time server to synchronize all the PCs in our domain. I checked the
system time of both computers and the system time of the physical pc hosting
the VM. They were identical. The problem is, that the db generates a document
id that differs from local system time on server by calculating back the
timestamp. Here is the used algorithm in Tcl
(http://www.activestate.com/activetcl/downloads):
public method ID2Time {docID {timeFormat "%d.%m.%Y %H:%M:%S"}} {
set docID [string range $docID 0 13];
# Getting the first 14 characters
set docTime [expr 0x$docID];
# Converting hex to decimal
set docTime [expr {$docTime / 1000000}];
# Calculate seconds out of microseconds
set docDate [clock format $docTime -format $timeFormat]
# Formating the time
return $docDate
}
I will now check if the problem occurs within a local installation of CouchDB
on my physical pc and will post the result here. Perhaps we really have a
problem using a virtual machine.
> error generating document id with utc_random
> --------------------------------------------
>
> Key: COUCHDB-1405
> URL: https://issues.apache.org/jira/browse/COUCHDB-1405
> Project: CouchDB
> Issue Type: Bug
> Components: Database Core
> Affects Versions: 1.1.1
> Environment: Windows 7, 64-bit, running as virtual pc in hyper-v
> Reporter: André Bögge
>
> I use the utc_random algorithm for generating document ids. So it's possible
> for me to calculate time and date out of the id in my client application.
> After running CouchDB for about a month i got a difference between system
> time and calculated time of id of about half an hour. I restarted the
> database and even then i got a difference about 1 minute.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira