Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change half an hour to 5 min #15

Open
patricksaber opened this issue Sep 24, 2021 · 1 comment
Open

Change half an hour to 5 min #15

patricksaber opened this issue Sep 24, 2021 · 1 comment

Comments

@patricksaber
Copy link

    long hour = TimeUnit.HOURS.toMillis(1);
    long halfHour = hour / 2;
    long fifteenMin = hour / 4;
    long tenMin = hour / 6;
    long fiveMin = tenMin / 2;

//generate EPG for one day only
List d = getTime12To12();
long startTime = d.get(0);
long endTime = d.get(1);

    Date date = new Date(startTime);
    calendar.setTime(date);
    int minutes = calendar.get(Calendar.MINUTE);
    int diff = 60 - minutes;
    //have only precise time from half and half an hour
    startTime = startTime + diff * 60000;


 timelineList = new ArrayList<>();
    for (long i = startTime; i <= endTime; ) {
        TimelineModel timelineModel = new TimelineModel();
        timelineModel.setTime(i);
        timelineList.add(timelineModel);
      //  i = i + halfHour ;
        i = i + fiveMin;
    }

I'm using 5 min for zooming but the program are missed placed even the timeline how to fix it ?
start date 12 am
end date 12 am
for one day only

@Duna
Copy link
Owner

Duna commented Mar 10, 2022

Have a look also on dim.xml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants