Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

Any time difference when taking survey by SSI Web CAPI

Hi,

Recently, we are conducting CBC survey by SSI Web CAPI. When I export the data, I found the interview time started at 4.30am, or 5.30 am something like that. I think it is really tricky, as we never start survey at the very early time.

I don't know why, but I suppose there would be time difference when conducting survey by SSI Web CAPI. We are at the location which is in GMT+8 time zone, could you please let me know whether my hypothesis is right or wrong? How can I get the interview time which is fit for my time zone?

Thanks in advance.
asked Dec 13, 2011 by ericdee Bronze (1,785 points)
retagged Sep 13, 2012 by Walter Williams
are you using latest version SSIWeb and SSIWebCAPI? i've heard colleagues having problems with one of the old versions.
Thanks for your reply.
I double check the SSI WebCAPI, it is downloaded from https://www.sawtoothsoftware.com/download/ssiweb/capi/Capi_2_2_0_Setup.exe. I think this is the latest version.

2 Answers

+1 vote
The time stored in variables like sys_EndTime / sys_StartTime is GMT time, i.e it takes the computer time and the local the regional settings and calculates the GMT time. In order to obtain the exact time of the computer (as displayed in the lower right taskbar) you can use this Perl script


[%Begin Unverified Perl

my ($sec,$min,$hour,$day_of_month,$mon,$year,$day_of_week,$day_of_year,$is_day_savings_time) = localtime;

$year += 1900;
my @abbr = qw( Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec );

#Format the time how you like it just fill it in here

#Example

return $day_of_month . "-" . $abbr[$mon] . "-" . $year . " " . $hour . ":" . $min;

End Unverified %]



This was posted by someone else, so I cannot take credit for it. I use it within a hidden variables right at the beginning of the questionnaire in order to find the start time
answered Dec 13, 2011 by Bogdan Cosneanu (430 points)
$abbr[$mon] or @abbr[$mon]?
Thank you so much. It is very useful information for me.
ericdee - you're welcome

Bahadir - this is a copy-paste from a survey, so it definitely works this way. I think it should be $abbr[$mon] because that's how a certain element of an array is referred to in Perl. @abbr is used just to declare the variable.
+1 vote
When perl time stamps the beginning of the survey, it uses the local time configured on the machine.  So it sounds like the CAPI computer time is not synced with GMT, or the time of the CAPI machine is off.

If you want a GMT time you can  use the code below but change the function from localtime to gmtime and store it into a free format hidden.
answered Dec 13, 2011 by Mike Lodder Gold (22,975 points)
Thanks Mike.So the Perl time stamps will record the start survey time only, not include end survey time, right?
Besides, I cannot find the code you mentioned. Would you please re-paste it again? Thanks so much.
The perl time stamps the end time as well.  But it uses local time.

[%Begin Unverified Perl
 
my ($sec,$min,$hour,$day_of_month,$mon,$year,$day_of_week,$day_of_year,$is_day_savings_time) = gmtime;
 
$year += 1900;
my @abbr = qw( Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec );
 
#Format the time how you like it just fill it in here
 
#Example
 
return $day_of_month . "-" . $abbr[$mon] . "-" . $year . " " . $hour . ":" . $min;
 
End Unverified %]
...