Home
last modified time | relevance | path

Searched refs:tz (Results 1 – 25 of 37) sorted by relevance

12

/frameworks/base/core/tests/coretests/src/android/text/format/
DRelativeDateTimeFormatterTest.java58 TimeZone tz = TimeZone.getTimeZone("GMT"); in test_getRelativeTimeSpanStringCTS() local
59 Calendar cal = Calendar.getInstance(tz, en_US); in test_getRelativeTimeSpanStringCTS()
65 getRelativeTimeSpanString(en_US, tz, baseTime - SECOND_IN_MILLIS, baseTime, in test_getRelativeTimeSpanStringCTS()
68 getRelativeTimeSpanString(en_US, tz, baseTime + SECOND_IN_MILLIS, baseTime, in test_getRelativeTimeSpanStringCTS()
72 getRelativeTimeSpanString(en_US, tz, 0, MINUTE_IN_MILLIS, MINUTE_IN_MILLIS, 0)); in test_getRelativeTimeSpanStringCTS()
74 getRelativeTimeSpanString(en_US, tz, MINUTE_IN_MILLIS, 0, MINUTE_IN_MILLIS, 0)); in test_getRelativeTimeSpanStringCTS()
77 getRelativeTimeSpanString(en_US, tz, baseTime - 42 * MINUTE_IN_MILLIS, baseTime, in test_getRelativeTimeSpanStringCTS()
80 getRelativeTimeSpanString(en_US, tz, baseTime + 42 * MINUTE_IN_MILLIS, baseTime, in test_getRelativeTimeSpanStringCTS()
85 getRelativeTimeSpanString(en_US, tz, baseTime - TWO_HOURS_IN_MS, baseTime, in test_getRelativeTimeSpanStringCTS()
88 getRelativeTimeSpanString(en_US, tz, baseTime + TWO_HOURS_IN_MS, baseTime, in test_getRelativeTimeSpanStringCTS()
[all …]
DDateIntervalFormatTest.java65 TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles"); in test_formatDateInterval() local
67 Calendar c = Calendar.getInstance(tz, ULocale.US); in test_formatDateInterval()
92 formatDateRange(en_US, tz, fixedTime, fixedTime + HOUR, FORMAT_SHOW_WEEKDAY)); in test_formatDateInterval()
94 formatDateRange(en_US, tz, timeWithCurrentYear, timeWithCurrentYear + HOUR, in test_formatDateInterval()
96 assertEquals("3:30\u202fAM", formatDateRange(en_US, tz, fixedTime, fixedTime, in test_formatDateInterval()
99 formatDateRange(en_US, tz, fixedTime, fixedTime + HOUR, FORMAT_SHOW_YEAR)); in test_formatDateInterval()
101 formatDateRange(en_US, tz, fixedTime, fixedTime + HOUR, FORMAT_NO_YEAR)); in test_formatDateInterval()
103 formatDateRange(en_US, tz, timeWithCurrentYear, timeWithCurrentYear + HOUR, in test_formatDateInterval()
106 formatDateRange(en_US, tz, fixedTime, fixedTime, FORMAT_12HOUR | FORMAT_SHOW_TIME)); in test_formatDateInterval()
108 formatDateRange(en_US, tz, fixedTime, fixedTime, FORMAT_24HOUR | FORMAT_SHOW_TIME)); in test_formatDateInterval()
[all …]
/frameworks/opt/timezonepicker/src/com/android/timezonepicker/
DTimeZoneData.java141 final TimeZone tz = TimeZone.getTimeZone(tzId); in loadTzs() local
142 if (tz == null) { in loadTzs()
147 TimeZoneInfo tzInfo = new TimeZoneInfo(tz, null); in loadTzs()
183 for (TimeZoneInfo tz : mTimeZones) { in loadTzs()
186 mTimeZonesById.put(tz.mTzId, tz); in loadTzs()
194 for (TimeZoneInfo tz : mTimeZones) { in loadTzs()
197 if (tz.mDisplayName == null) { in loadTzs()
198 tz.mDisplayName = tz.mTz.getDisplayName(tz.mTz.inDaylightTime(date), in loadTzs()
204 ArrayList<Integer> group = mTimeZonesByCountry.get(tz.mCountry); in loadTzs()
207 mTimeZonesByCountry.put(tz.mCountry, group); in loadTzs()
[all …]
DTimeZonePickerUtils.java82 private CharSequence buildGmtDisplayName(TimeZone tz, long timeMillis, boolean grayGmt) { in buildGmtDisplayName() argument
83 Time time = new Time(tz.getID()); in buildGmtDisplayName()
88 String displayName = getDisplayName(tz, time.isDst != 0); in buildGmtDisplayName()
92 final int gmtOffset = tz.getOffset(timeMillis); in buildGmtDisplayName()
99 if (tz.useDaylightTime()) { in buildGmtDisplayName()
112 if (tz.useDaylightTime()) { in buildGmtDisplayName()
161 private String getDisplayName(TimeZone tz, boolean daylightTime) { in getDisplayName() argument
164 return tz.getDisplayName(daylightTime, TimeZone.LONG, Locale.getDefault()); in getDisplayName()
168 if (tz.getID().equals(mOverrideIds[i])) { in getDisplayName()
180 return tz.getDisplayName(daylightTime, TimeZone.LONG, Locale.getDefault()); in getDisplayName()
DTimeZoneInfo.java56 public TimeZoneInfo(TimeZone tz, String country) { in TimeZoneInfo() argument
57 mTz = tz; in TimeZoneInfo()
58 mTzId = tz.getID(); in TimeZoneInfo()
60 mRawoffset = tz.getRawOffset(); in TimeZoneInfo()
198 final TimeZone tz = this.mTz; in toString() local
202 sb.append(tz.getDisplayName(false /* daylightTime */, TimeZone.LONG)); in toString()
204 sb.append(tz.getDisplayName(false /* daylightTime */, TimeZone.SHORT)); in toString()
206 if (tz.useDaylightTime()) { in toString()
207 sb.append(tz.getDisplayName(true, TimeZone.LONG)); in toString()
209 sb.append(tz.getDisplayName(true, TimeZone.SHORT)); in toString()
[all …]
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/datetime/
DZoneGetter.java99 public static CharSequence getTimeZoneOffsetAndName(Context context, TimeZone tz, Date now) { in getTimeZoneOffsetAndName() argument
102 CharSequence gmtText = getGmtOffsetText(tzFormatter, locale, tz, now); in getTimeZoneOffsetAndName()
105 locale, getZoneLongName(locale, timeZoneNames, tz, now)); in getTimeZoneOffsetAndName()
145 TimeZone tz = data.timeZones[i]; in getZonesList() local
149 useExemplarLocationForLocalNames, tz, data.olsonIdsToDisplay[i]); in getZonesList()
154 int offsetMillis = tz.getOffset(now.getTime()); in getZonesList()
156 createDisplayEntry(tz, gmtOffsetText, displayName, offsetMillis); in getZonesList()
163 TimeZone tz, CharSequence gmtOffsetText, CharSequence displayName, int offsetMillis) { in createDisplayEntry() argument
165 map.put(KEY_ID, tz.getID()); in createDisplayEntry()
212 final TimeZone tz = data.timeZones[i]; in shouldUseExemplarLocationForLocalNames() local
[all …]
/frameworks/base/telephony/common/com/android/internal/telephony/
DHbpcdUtils.java42 public int getMcc(int sid, int tz, int DSTflag, boolean isNitzTimeZone) { in getMcc() argument
79 MccLookup.GMT_OFFSET_LOW + "<=" + tz + ") and (" + tz + "<=" + in getMcc()
81 MccLookup.GMT_DST_LOW + "<=" + tz + ") and (" + tz + "<=" + in getMcc()
/frameworks/opt/calendar/tests/src/com/android/calendarcommon2/
DRecurrenceProcessorTest.java87 String tz = "America/Los_Angeles"; in verifyRecurrence() local
88 Time dtstart = new Time(tz); in verifyRecurrence()
89 Time rangeStart = new Time(tz); in verifyRecurrence()
90 Time rangeEnd = new Time(tz); in verifyRecurrence()
91 Time outCal = new Time(tz); in verifyRecurrence()
154 Time expectedLast = new Time(tz); in verifyRecurrence()
2452 String tz = "America/Los_Angeles"; in performanceTextExpand() local
2453 Time dtstart = new Time(tz); in performanceTextExpand()
2454 Time rangeStart = new Time(tz); in performanceTextExpand()
2455 Time rangeEnd = new Time(tz); in performanceTextExpand()
[all …]
DRRuleTest.java71 String golden, String advanceTo, String tz) throws Exception { in runRecurrenceIteratorTest() argument
72 runRecurrenceIteratorTest(rrule, dtstartStr, limit, golden, advanceTo, null, tz); in runRecurrenceIteratorTest()
89 String golden, String advanceTo, String endAt, String tz) throws Exception { in runRecurrenceIteratorTest() argument
98 Time dtstart = new Time(tz); in runRecurrenceIteratorTest()
99 Time rangeStart = new Time(tz); in runRecurrenceIteratorTest()
100 Time rangeEnd = new Time(tz); in runRecurrenceIteratorTest()
101 Time outCal = new Time(tz); in runRecurrenceIteratorTest()
/frameworks/base/core/java/android/text/format/
DRelativeDateTimeFormatter.java93 public static String getRelativeTimeSpanString(Locale locale, java.util.TimeZone tz, long time, in getRelativeTimeSpanString() argument
100 return getRelativeTimeSpanString(locale, tz, time, now, minResolution, flags, in getRelativeTimeSpanString()
104 public static String getRelativeTimeSpanString(Locale locale, java.util.TimeZone tz, long time, in getRelativeTimeSpanString() argument
109 if (tz == null) { in getRelativeTimeSpanString()
113 android.icu.util.TimeZone icuTimeZone = DateUtilsBridge.icuTimeZone(tz); in getRelativeTimeSpanString()
260 public static String getRelativeDateTimeString(Locale locale, java.util.TimeZone tz, long time, in getRelativeDateTimeString() argument
266 if (tz == null) { in getRelativeDateTimeString()
270 android.icu.util.TimeZone icuTimeZone = DateUtilsBridge.icuTimeZone(tz); in getRelativeDateTimeString()
DDateIntervalFormat.java57 TimeZone tz = (olsonId != null) ? TimeZone.getTimeZone(olsonId) : TimeZone.getDefault(); in formatDateRange() local
58 android.icu.util.TimeZone icuTimeZone = DateUtilsBridge.icuTimeZone(tz); in formatDateRange()
DDateUtilsBridge.java56 public static TimeZone icuTimeZone(java.util.TimeZone tz) { in icuTimeZone() argument
57 TimeZone icuTimeZone = TimeZone.getTimeZone(tz.getID()); in icuTimeZone()
/frameworks/base/rs/java/android/renderscript/
DAllocationAdapter.java50 int tz = mAdaptedAllocation.mType.getZ(); in initLOD() local
53 if ((tx==1) && (ty == 1) && (tz == 1)) { in initLOD()
59 if (tz > 1) tz >>= 1; in initLOD()
64 mCurrentDimZ = tz; in initLOD()
/frameworks/base/tests/LocationTracker/src/com/android/locationtracker/data/
DDateUtils.java39 TimeZone tz = TimeZone.getTimeZone("GMT"); in getKMLTimestamp() local
40 Calendar c = Calendar.getInstance(tz); in getKMLTimestamp()
/frameworks/base/core/tests/coretests/src/android/app/activity/
DSetTimeZonePermissionsTest.java56 String tz = mZones[i]; in testSetTimeZonePermissions() local
58 mAlarm.setTimeZone(tz); in testSetTimeZonePermissions()
/frameworks/rs/
DrsScript.cpp177 char *tz = (char *) malloc(length + 1); in rsi_ScriptSetTimeZone() local
178 if (!tz) { in rsi_ScriptSetTimeZone()
182 strncpy(tz, timeZone, length); in rsi_ScriptSetTimeZone()
183 tz[length] = '\0'; in rsi_ScriptSetTimeZone()
184 if (setenv("TZ", tz, 1) == 0) { in rsi_ScriptSetTimeZone()
189 free(tz); in rsi_ScriptSetTimeZone()
DrsType.cpp103 uint32_t tz = mHal.state.dimZ; in compute() local
109 mHal.state.lodDimZ[lod] = tz; in compute()
110 mCellCount += tx * rsMax(ty, 1u) * rsMax(tz, 1u); in compute()
113 if (tz > 1) tz >>= 1; in compute()
125 mHal.state.lodDimZ[0] = tz; in compute()
/frameworks/libs/binary_translation/tests/ndk_program_tests/
Dtime_test.cc70 struct timezone tz; in TEST() local
73 ASSERT_EQ(0, gettimeofday(&tv, &tz)); in TEST()
/frameworks/opt/calendar/src/com/android/calendarcommon2/
DRecurrenceSet.java149 String tz = Time.TIMEZONE_UTC; in parseRecurrenceDates() local
152 tz = recurrence.substring(0, tzidx); in parseRecurrenceDates()
155 Time time = new Time(tz); in parseRecurrenceDates()
170 time.setTimezone(tz); in parseRecurrenceDates()
449 String tz = null; in addPropertyForDateStr() local
452 tz = dateStr.substring(0, tzidx); in addPropertyForDateStr()
455 if (!TextUtils.isEmpty(tz)) { in addPropertyForDateStr()
456 prop.addParameter(new ICalendar.Parameter("TZID", tz)); in addPropertyForDateStr()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/cat/
DResponseData.java262 String tz = SystemProperties.get("persist.sys.timezone", ""); in format() local
263 if (TextUtils.isEmpty(tz)) { in format()
266 TimeZone zone = TimeZone.getTimeZone(tz); in format()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/nitz/
DTimeZoneLookupHelper.java270 TimeZone tz = TimeZone.getFrozenTimeZone(zone); in lookupByInstantOffsetDst() local
271 if (offsetMatchesAtTime(tz, utcOffsetMillis, isDst, timeMillis)) { in lookupByInstantOffsetDst()
273 match = tz; in lookupByInstantOffsetDst()
/frameworks/base/core/java/android/service/notification/
DScheduleCalendar.java87 public void setTimeZone(TimeZone tz) { in setTimeZone() argument
88 mCalendar.setTimeZone(tz); in setTimeZone()
/frameworks/base/media/java/android/media/
DMetadata.java516 TimeZone tz = TimeZone.getTimeZone(timeZone); in getDate() local
517 Calendar cal = Calendar.getInstance(tz); in getDate()
/frameworks/base/tools/aapt2/format/
DArchive_test.cpp251 TzSetter tz("UTC0"); in TEST_F() local
274 TzSetter tz("PST8"); in TEST_F() local
297 TzSetter tz("EET-2"); in TEST_F() local
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/
DMediaPlayerMetadataParserTest.java402 private void writeDateRecord(int metadataId, long time, String tz) { in writeDateRecord() argument
408 mParcel.writeString(tz); in writeDateRecord()

12