/packages/apps/Email/emailcommon/src/org/apache/james/mime4j/field/datetime/ |
DateTime.java | 28 import java.util.TimeZone;
40 private final int timeZone;
42 public DateTime(String yearString, int month, int day, int hour, int minute, int second, int timeZone) {
44 this.date = convertToDate(year, month, day, hour, minute, second, timeZone);
50 this.timeZone = timeZone;
69 public static Date convertToDate(int year, int month, int day, int hour, int minute, int second, int timeZone) {
70 Calendar c = new GregorianCalendar(TimeZone.getTimeZone("GMT+0"));
74 if (timeZone != Integer.MIN_VALUE) {
75 int minutes = ((timeZone / 100) * 60) + timeZone % 100; [all...] |
/external/webkit/Source/JavaScriptCore/wtf/ |
DateMath.h | 161 timeZone = adoptArrayPtr(new char[inZoneSize]); 162 strncpy(timeZone.get(), inTm.tm_zone, inZoneSize); 164 timeZone = nullptr; 187 ret.tm_zone = timeZone.get(); 205 if (rhs.timeZone) { 206 int inZoneSize = strlen(rhs.timeZone.get()) + 1; 207 timeZone = adoptArrayPtr(new char[inZoneSize]); 208 strncpy(timeZone.get(), rhs.timeZone.get(), inZoneSize); 210 timeZone = nullptr [all...] |
/frameworks/base/core/java/android/app/ |
AlarmManager.java | 298 * @param timeZone in the format understood by {@link java.util.TimeZone} 300 public void setTimeZone(String timeZone) { 302 mService.setTimeZone(timeZone);
|
/development/samples/GlobalTime/src/com/android/globaltime/ |
City.java | 27 import java.util.TimeZone; 40 private TimeZone timeZone = null; 126 TimeZone tz1 = c1.getTimeZone(); 127 TimeZone tz2 = c2.getTimeZone(); 188 public TimeZone getTimeZone() { 189 if (timeZone == null) { 190 timeZone = TimeZone.getTimeZone(timeZoneID); 192 return timeZone; [all...] |
/cts/tests/tests/permission/src/android/permission/cts/ |
NoSystemFunctionPermissionTest.java | 31 import java.util.TimeZone; 66 String[] timeZones = TimeZone.getAvailableIDs(); 67 String timeZone = timeZones[0]; 70 alarmManager.setTimeZone(timeZone);
|
/libcore/luni/src/main/java/java/util/ |
TimeZone.java | 25 * {@code TimeZone} represents a time zone, primarily used for configuring a {@link Calendar} or 28 * <p>Most applications will use {@link #getDefault} which returns a {@code TimeZone} based on 31 * <p>You can also get a specific {@code TimeZone} {@link #getTimeZone by id}. 64 public abstract class TimeZone implements Serializable, Cloneable { 79 static final TimeZone GMT = new SimpleTimeZone(0, "GMT"); // Greenwich Mean Time 81 private static TimeZone defaultTimeZone; 85 public TimeZone() {} 126 public static synchronized TimeZone getDefault() { 130 return (TimeZone) defaultTimeZone.clone(); 134 * Equivalent to {@code getDisplayName(false, TimeZone.LONG, Locale.getDefault())} [all...] |
GregorianCalendar.java | 109 * String[] ids = TimeZone.getAvailableIDs(-8 * 60 * 60 * 1000); 182 * @see TimeZone 236 * time with the default {@code Locale} and {@code TimeZone}. 239 this(TimeZone.getDefault(), Locale.getDefault()); 244 * {@code TimeZone} and {@code Locale} on the specified date. 254 super(TimeZone.getDefault(), Locale.getDefault()); 260 * time in the default {@code TimeZone} and {@code Locale}. 274 super(TimeZone.getDefault(), Locale.getDefault()); 280 * time in the default {@code TimeZone} and {@code Locale}. 297 super(TimeZone.getDefault(), Locale.getDefault()) [all...] |
/external/jsilver/src/org/clearsilver/jni/ |
JniHdf.java | 25 import java.util.TimeZone; 213 /** Export a date to a clearsilver tree using a specified timezone */ 214 public void exportDate(String hdfname, TimeZone timeZone, Date date) { 219 Calendar cal = Calendar.getInstance(timeZone); 252 boolean tzNegative = timeZone.getRawOffset() < 0; 253 int tzAbsolute = java.lang.Math.abs(timeZone.getRawOffset()/1000); 262 /** Export a date to a clearsilver tree using a specified timezone */ 268 TimeZone timeZone = TimeZone.getTimeZone(tz) [all...] |
/packages/apps/Calendar/src/com/android/calendar/ |
CalendarUtils.java | 195 * @param timeZone The time zone to set Calendar to, or 198 public void setTimeZone(Context context, String timeZone) { 199 if (TextUtils.isEmpty(timeZone)) { 207 if (CalendarCache.TIMEZONE_TYPE_AUTO.equals(timeZone)) { 213 if (!mUseHomeTZ || !TextUtils.equals(mHomeTZ, timeZone)) { 217 mHomeTZ = timeZone;
|
/frameworks/base/graphics/java/android/renderscript/ |
Script.java | 165 public void setTimeZone(String timeZone) { 168 mRS.nScriptSetTimeZone(getID(), timeZone.getBytes("UTF-8"));
|
/external/bouncycastle/src/main/java/org/bouncycastle/asn1/ |
DERGeneralizedTime.java | 8 import java.util.TimeZone; 172 TimeZone timeZone = TimeZone.getDefault(); 173 int offset = timeZone.getRawOffset(); 184 if (timeZone.useDaylightTime() && timeZone.inDaylightTime(this.getDate())) 251 dateF.setTimeZone(new SimpleTimeZone(0, TimeZone.getDefault().getID()));
|
/external/jsilver/src/org/clearsilver/ |
HDF.java | 22 import java.util.TimeZone; 97 * Export a date to a clearsilver tree using a specified timezone 99 void exportDate(String hdfName, TimeZone timeZone, Date date); 102 * Export a date to a clearsilver tree using a specified timezone
|
DelegatedHdf.java | 22 import java.util.TimeZone; 123 String hdfname, TimeZone timeZone, Date date) { 124 getHdf().exportDate(hdfname, timeZone, date);
|
/cts/tests/tests/provider/src/android/provider/cts/ |
CalendarTest.java | 427 String timeZone = values.getAsString(Events.EVENT_TIMEZONE); 428 Time time = new Time(timeZone); [all...] |
/packages/apps/Exchange/src/com/android/exchange/utility/ |
CalendarUtilities.java | 64 import java.util.TimeZone; 117 // TimeZone cache; we parse/decode as little as possible, because the process is quite slow 118 private static HashMap<String, TimeZone> sTimeZoneCache = new HashMap<String, TimeZone>(); 120 private static HashMap<TimeZone, String> sTziStringCache = new HashMap<TimeZone, String>(); 122 private static final TimeZone UTC_TIMEZONE = TimeZone.getTimeZone("UTC"); 148 static final TimeZone sGmtTimeZone = TimeZone.getTimeZone("GMT") [all...] |
/packages/apps/Calendar/src/com/android/calendar/widget/ |
CalendarAppWidgetModel.java | 34 import java.util.TimeZone; 251 public CalendarAppWidgetModel(Context context, String timeZone) { 253 Time time = new Time(timeZone); 263 public void buildFromCursor(Cursor cursor, String timeZone) { 264 final Time recycle = new Time(timeZone); 271 mShowTZ = !TextUtils.equals(timeZone, Time.getCurrentTimezone()); 273 mHomeTZName = TimeZone.getTimeZone(timeZone).getDisplayName(recycle.isDst != 0, 274 TimeZone.SHORT); 296 // Adjust all-day times into local timezone [all...] |
CalendarAppWidgetService.java | 384 Context context, Cursor cursor, String timeZone) { 385 CalendarAppWidgetModel model = new CalendarAppWidgetModel(context, timeZone); 386 model.buildFromCursor(cursor, timeZone); 393 private long calculateUpdateTime(CalendarAppWidgetModel model, long now, String timeZone) { 395 long minUpdateTime = getNextMidnightTimeMillis(timeZone); 412 private static long getNextMidnightTimeMillis(String timezone) { 421 time.timezone = timezone;
|
/external/apache-harmony/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/ |
TimeTest.java | 21 import java.util.TimeZone; 98 private void testToString(String timeZone, long[] theTimes, 100 // Set the timezone 101 TimeZone.setDefault(TimeZone.getTimeZone(timeZone)); 117 TimeZone.setDefault(TimeZone.getTimeZone("GMT")); 141 // Ensure that the timezone is set to GMT 142 TimeZone.setDefault(TimeZone.getTimeZone("GMT")) [all...] |
DateTest.java | 22 import java.util.TimeZone; 33 static Calendar aCal = Calendar.getInstance(TimeZone.getTimeZone("GMT")); 244 private void testToString(String timeZone, long[] theDates, String[] theDateStrings) { 245 // Set the timezone 246 TimeZone.setDefault(TimeZone.getTimeZone(timeZone)); 278 TimeZone.setDefault(TimeZone.getTimeZone(timeZoneName)); 388 // Reset defualt timezone [all...] |
/libcore/luni/src/test/java/libcore/java/util/ |
TimeZoneTest.java | 22 import java.util.TimeZone; 28 TimeZone asiaTaipei = TimeZone.getTimeZone("Asia/Taipei"); 34 TimeZone atlanticReykjavik = TimeZone.getTimeZone("Atlantic/Reykjavik"); 48 TimeZone tz0001 = new SimpleTimeZone(60000, "ONE MINUTE"); 49 TimeZone tz0130 = new SimpleTimeZone(5400000, "ONE HOUR, THIRTY"); 50 TimeZone tzMinus0130 = new SimpleTimeZone(-5400000, "NEG ONE HOUR, THIRTY"); 51 assertEquals("GMT+00:01", tz0001.getDisplayName(false, TimeZone.SHORT, Locale.US)); 52 assertEquals("GMT+01:30", tz0130.getDisplayName(false, TimeZone.SHORT, Locale.US)) [all...] |
CalendarTest.java | 22 import java.util.TimeZone; 26 private static final TimeZone AMERICA_SAO_PAULO = TimeZone.getTimeZone("America/Sao_Paulo"); 29 private static final TimeZone AUSTRALIA_LORD_HOWE = TimeZone.getTimeZone("Australia/Lord_Howe"); 33 * TimeZone.useDaylightTime() as an optimization will probably be broken 36 private static final TimeZone ASIA_KUALA_LUMPUR = TimeZone.getTimeZone("Asia/Kuala_Lumpur"); 38 private static final TimeZone ASIA_SEOUL = TimeZone.getTimeZone("Asia/Seoul") [all...] |
/frameworks/base/media/java/android/media/ |
Metadata.java | 28 import java.util.TimeZone; 487 final String timeZone = mParcel.readString(); 489 if (timeZone.length() == 0) { 492 TimeZone tz = TimeZone.getTimeZone(timeZone);
|
/libcore/luni/src/main/java/libcore/util/ |
ZoneInfo.java | 23 import java.util.TimeZone; 26 * Our concrete TimeZone implementation, backed by zoneinfo data. 28 * @hide - used to implement TimeZone 30 public final class ZoneInfo extends TimeZone { 192 @Override public boolean hasSameRules(TimeZone timeZone) { 193 if (!(timeZone instanceof ZoneInfo)) { 196 ZoneInfo other = (ZoneInfo) timeZone; 244 String utcTime = formatTime(mTransitions[i], TimeZone.getTimeZone("UTC")); 254 private static String formatTime(int s, TimeZone tz) [all...] |
/frameworks/base/libs/rs/ |
rsScript.cpp | 91 void rsi_ScriptSetTimeZone(Context * rsc, RsScript vs, const char * timeZone, size_t length) { 93 s->mEnviroment.mTimeZone = timeZone;
|
/packages/apps/Exchange/tests/src/com/android/exchange/utility/ |
CalendarUtilitiesTests.java | 50 import java.util.TimeZone; 88 // Test a timezone with GMT bias but bogus DST parameters (there is no equivalent time zone 129 TimeZone tz = CalendarUtilities.tziStringToTimeZone(AMERICA_DAWSON_TIME); 139 TimeZone.setDefault(TimeZone.getTimeZone("America/Phoenix")); 142 TimeZone.setDefault(TimeZone.getTimeZone("Pacific/Honolulu")); 147 TimeZone azTime = TimeZone.getTimeZone("America/Phoenix"); 148 TimeZone.setDefault(TimeZone.getTimeZone("America/Los_Angeles")) [all...] |