Merge branch 'varsha/1170_birthday_changes_on_changing_timezone' of https://github.com/Varsha-29/Simple-Calendar
This commit is contained in:
commit
51f7d373fd
2 changed files with 4 additions and 2 deletions
|
@ -85,6 +85,8 @@ object Formatter {
|
|||
|
||||
fun getDateTimeFromTS(ts: Long) = DateTime(ts * 1000L, DateTimeZone.getDefault())
|
||||
|
||||
fun getDateTimeFromTSForATimeZone(ts: Long, timeZoneId: String) = DateTime(ts * 1000L, DateTimeZone.forID(timeZoneId))
|
||||
|
||||
fun getUTCDateTimeFromTS(ts: Long) = DateTime(ts * 1000L, DateTimeZone.UTC)
|
||||
|
||||
// use manually translated month names, as DateFormat and Joda have issues with a lot of languages
|
||||
|
|
|
@ -84,8 +84,8 @@ class MonthlyCalendarImpl(val callback: MonthlyCalendar, val context: Context) {
|
|||
private fun markDaysWithEvents(days: ArrayList<DayMonthly>) {
|
||||
val dayEvents = HashMap<String, ArrayList<Event>>()
|
||||
mEvents.forEach {
|
||||
val startDateTime = Formatter.getDateTimeFromTS(it.startTS)
|
||||
val endDateTime = Formatter.getDateTimeFromTS(it.endTS)
|
||||
val startDateTime = Formatter.getDateTimeFromTSForATimeZone(it.startTS, it.timeZone)
|
||||
val endDateTime = Formatter.getDateTimeFromTSForATimeZone(it.endTS, it.timeZone)
|
||||
val endCode = Formatter.getDayCodeFromDateTime(endDateTime)
|
||||
|
||||
var currDay = startDateTime
|
||||
|
|
Loading…
Reference in a new issue