Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1f18480d authored by Håkan3 Johansson's avatar Håkan3 Johansson Committed by Jaikumar Ganesh
Browse files

Send local time, not GMT, in timestamp.

The missed, incoming and outgoing call list shall always have its
time specified in local time according to PBAP V10r00 chapter
"3.1.4.1 Call History extension".

Change-Id: If0c4733552db3813d636a2f4658e64df1c6a4efe
parent ff53e476
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -75,8 +75,6 @@ public class BluetoothPbapCallLogComposer {
    private static final String VCARD_PROPERTY_CALLTYPE_OUTGOING = "DIALED";
    private static final String VCARD_PROPERTY_CALLTYPE_MISSED = "MISSED";

    private static final String FLAG_TIMEZONE_UTC = "Z";

    private final Context mContext;
    private ContentResolver mContentResolver;
    private Cursor mCursor;
@@ -197,13 +195,12 @@ public class BluetoothPbapCallLogComposer {

    /**
     * Format according to RFC 2445 DATETIME type.
     * The format is: ("%Y%m%dT%H%M%SZ").
     * The format is: ("%Y%m%dT%H%M%S").
     */
    private final String toRfc2455Format(final long millSecs) {
        Time startDate = new Time();
        startDate.set(millSecs);
        String date = startDate.format2445();
        return date + FLAG_TIMEZONE_UTC;
        return startDate.format2445();
    }

    /**
@@ -218,7 +215,7 @@ public class BluetoothPbapCallLogComposer {
        // to the requesting device (For example, transferring phone book
        // when connected over bluetooth)
        //
        // e.g. "X-IRMC-CALL-DATETIME;MISSED:20050320T100000Z"
        // e.g. "X-IRMC-CALL-DATETIME;MISSED:20050320T100000"
        final int callLogType = mCursor.getInt(CALL_TYPE_COLUMN_INDEX);
        final String callLogTypeStr;
        switch (callLogType) {