Commit 203b1bbe authored by Florian Klien's avatar Florian Klien

bugfix: timezone set to Europe/Vienna

parent 9f1ec872
......@@ -3,8 +3,8 @@
package="at.linuxtage.companion"
xmlns:android="http://schemas.android.com/apk/res/android"
android:installLocation="auto"
android:versionCode="6"
android:versionName="1.0.1">
android:versionCode="7"
android:versionName="1.0.2">
<uses-sdk
android:minSdkVersion="7"
......
......@@ -349,7 +349,7 @@ public class DatabaseManager {
return year;
}
Calendar cal = Calendar.getInstance(DateUtils.getBelgiumTimeZone(), Locale.US);
Calendar cal = Calendar.getInstance(DateUtils.getAustriaTimeZone(), Locale.US);
// Compute from cachedDays if available
if (cachedDays != null) {
......
......@@ -11,7 +11,7 @@ import at.linuxtage.companion.utils.DateUtils;
public class Day implements Parcelable {
private static final DateFormat DAY_DATE_FORMAT = DateUtils.withBelgiumTimeZone(new SimpleDateFormat("d.M. (EEEE)", Locale.getDefault()));
private static final DateFormat DAY_DATE_FORMAT = DateUtils.withAustriaTimeZone(new SimpleDateFormat("d.M. (EEEE)", Locale.getDefault()));
private int index;
private Date date;
......
......@@ -25,10 +25,10 @@ import at.linuxtage.companion.utils.DateUtils;
*/
public class EventsParser extends IterableAbstractPullParser<Event> {
private final DateFormat DATE_FORMAT = DateUtils.withBelgiumTimeZone(new SimpleDateFormat("yyyy-MM-dd", Locale.US));
private final DateFormat DATE_FORMAT = DateUtils.withAustriaTimeZone(new SimpleDateFormat("yyyy-MM-dd", Locale.US));
// Calendar used to compute the events time, according to Belgium timezone
private final Calendar calendar = Calendar.getInstance(DateUtils.getBelgiumTimeZone(), Locale.US);
private final Calendar calendar = Calendar.getInstance(DateUtils.getAustriaTimeZone(), Locale.US);
private Day currentDay;
private String currentRoom;
......
......@@ -7,16 +7,16 @@ import java.util.TimeZone;
public class DateUtils {
private static final TimeZone BELGIUM_TIME_ZONE = TimeZone.getTimeZone("GMT+1");
private static final TimeZone AUSTRIA_TIME_ZONE = TimeZone.getTimeZone("Europe/Vienna");
private static final DateFormat TIME_DATE_FORMAT = withBelgiumTimeZone(SimpleDateFormat.getTimeInstance(SimpleDateFormat.SHORT, Locale.getDefault()));
private static final DateFormat TIME_DATE_FORMAT = withAustriaTimeZone(SimpleDateFormat.getTimeInstance(SimpleDateFormat.SHORT, Locale.getDefault()));
public static TimeZone getBelgiumTimeZone() {
return BELGIUM_TIME_ZONE;
public static TimeZone getAustriaTimeZone() {
return AUSTRIA_TIME_ZONE;
}
public static DateFormat withBelgiumTimeZone(DateFormat format) {
format.setTimeZone(BELGIUM_TIME_ZONE);
public static DateFormat withAustriaTimeZone(DateFormat format) {
format.setTimeZone(AUSTRIA_TIME_ZONE);
return format;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment