7 Component.onCompleted: {
8 var dt = datetimeExporter.getDateTime()
9 var offset = datetimeExporter.getDateTimeOffset()
10 var date = datetimeExporter.getDate()
11 var timespec = datetimeExporter.getTimeSpec()
13 // The test date is 2009-5-12 23:59:59 (UTC-11:30)
14 var compare = new Date('2009-05-12T23:59:59-11:30')
16 // Adjust for timezone to extract correct partial values
17 var dtUtc = new Date(dt.getTime() + (offset * 60000))
18 var dtAdjusted = new Date(dtUtc.getUTCFullYear(),
22 dtUtc.getUTCMinutes(),
23 dtUtc.getUTCSeconds(),
24 dtUtc.getUTCMilliseconds())
26 boolProperty = (dt.getTime() == compare.getTime()) &&
27 (offset == -((11 * 60) + 30)) &&
28 (timespec == '-11:30') &&
29 (dtAdjusted.getFullYear() == 2009) &&
30 (dtAdjusted.getMonth() == 5-1) &&
31 (dtAdjusted.getDate() == 12) &&
32 (dtAdjusted.getHours() == 23) &&
33 (dtAdjusted.getMinutes() == 59) &&
34 (dtAdjusted.getSeconds() == 59) &&
35 (date.getFullYear() == 2009) &&
36 (date.getMonth() == 5-1) &&
37 (date.getDate() == 12)