Closed tingan closed 10 years ago
The time unit is milliseconds, so to make the output in seconds, just divide 1000. For example, 60000 / 1000 = 60 s.
From: tingan [notifications@github.com] Sent: 18 April 2013 14:15 To: sizzlelab/contextlogger3 Subject: [contextlogger3] LoggerApp activity datetime adjustment issue (#30)
Hi, Chao
In BJAST elderly test, we got the data like this timestamp, activity 1365853372,eatSTART-69900001 1365749987,eatSTOP-1 1365931332,homeSTOP-60000
The strange things are: the -69900001 is very big, also the -60000 is big. other adjustments are all minus 1. How can users adjust the time to 1 second?
There must be some systematic problems for the issues.
— Reply to this email directly or view it on GitHubhttps://github.com/sizzlelab/contextlogger3/issues/30.
Ok, even this make sense, how can you explain the -1 , this mean -1/1000 seconds adjustment?
for this 1365853372,eatSTART-69900001, what is the formula for the correct time? is it the 1365853372 - 69900001/1000, then convert the resulting timestamp to datetime?
All the time is recorded in milliseconds (by using UNIX timestamp on the device). The first timestampe is UI event timestamp (click button), and the timestamp after the event name is the time offset (compared between the time adjustment through the time picker and UI event timestampe). Thus, the formula for the actual event timestamp is shown below.
result (activity timestamp) = UI event timestamp - (offset / 1000)
After that convert the result to human readable format.
From: tingan [notifications@github.com] Sent: 19 April 2013 11:02 To: sizzlelab/contextlogger3 Cc: Wei Chao Subject: Re: [contextlogger3] LoggerApp activity datetime adjustment issue (#30)
for this 1365853372,eatSTART-69900001, what is the formula for the correct time? is it the 1365853372 - 69900001/1000, then convert the resulting timestamp to datetime?
— Reply to this email directly or view it on GitHubhttps://github.com/sizzlelab/contextlogger3/issues/30#issuecomment-16640722.
Hi, Chao
In BJAST elderly test, we got the data like this timestamp, activity 1365853372,eatSTART-69900001 1365749987,eatSTOP-1 1365931332,homeSTOP-60000
The strange things are: the -69900001 is very big, also the -60000 is big. other adjustments are all minus 1. How can users adjust the time to 1 second?
There must be some systematic problems for the issues.