I don’t know how the Fraction of 6:30 am is highest and 7:00 am is lowest. I see the one topic in this forum and use DateTime - Int(DateTime) to calculate the Fraction of each slot and I don’t validate the time follow slots. I am in VietNam and use the time zone of HaNoi which is the capital of Viet Nam. I think it is the reason lead to this problem. How to solve this problem and transfers the lowest value is 00:00am and highest value is 23:30pm and thank you.
Hi @thuongzzu, you are right: This could be related to timezone differences.
Never saw this before.
The timestamp in the data base is stored with the timezone information and adjusted for your display as in the date time column of your screen shot. The time fraction does not have a dedicated timezone information. This depends on the available timestamp when the fraction is calculated.
Where and when are you calculating the fraction?
Are both fields - the date time field and fraction field - written with the same create/update action?
Is it possible that the 7:00 am record was created by a user in a different timezone?
I just checked one of my old apps with different timezones and could not find a difference:
I am using a Date & Time Picker for the input.
The Submit Button of the Form has to actions:
- Update of the just created record with the fraction calculation:
Display of records
On the following screen, I use a list with different display formats:
Time Fraction stored in the data base:
Stored Time with format Time:
Stored Time without formatting:
Stored Time with format Date:
Which looks like this:
As you can see in the unformatted time the value is store in Zulu time.
The first two records show a difference of +2 which is the timezone setting of my system, when I created the screen shot.
Validating with recalculation of fractions in different timezone
To validate if there is a difference with the fraction calculation when I change the timezone I added a second field in the database and a Recalculate button.
The button does the same fraction calculation with the initially stored timestamp and stores the result in the second field. Displayed at the end of the listed records.
With this setup I created new initial entries with different timezone settings of my computer and recalculated the old records from June and the new records from today. Also with different timezone settings.
I could not find any difference. So the calculation is working fine based on Zulu time.
With the second conclusion:
If have no idea what is causing the difference in your records
So back to my questions above: Where/How and when are you calculating the fraction? Life app with users in different timezones? During Preview and testing?
Maybe it is just a kind of strange frontend/buffering problem of the preview functionality?
I have read your reply and I have tried any experiment to check the time and the result my app returns me is a value which is not change. I do an app to booking meeting for my company follow slots and the distances each slot is 30 minutes. I also use your recipe to calculate the fraction of each slot but the result have no change. you see that the time unformatting is 16:05:56 and the normal time is 8:05pm, it look differences 4 hours. I don’t know how to config the timezone in adalo I think I should back any hours in timezone to calculate it exactly. Thanks your reply
The time displayed in Adalo depends on the timezone settings of your OS. You have to check/change it in your Window settings.
Checked it again and found that there is indeed a timezone impact for the calculation:
I am in timezone GMY+4.
When I e.g. enter 03:05 AM GMT+4 the value stored in the data base is actually 23:05 PM GMT0 (or Yulu time) of the previous day.
I have to figure out how to change the formula to reflect the timezone. Give me some time to come back with a solution .
As we have no option to read the timezone settings of the OS in Adalo this has to be either “hardcoded” or better with a timezone property in the user record.
Another approach for your booking scenario would be to prepare a table with booking slots of 30min like the on in this example, which reflects opening hours/shifts:
it’s not impossible for my app because my boss requires me to flex in each slot for example
and it’s not permanent everyday like opening and closing hour. And I also have a question:
Can you help me to resolve this problem. I set relationship of the collection meetings and datetime is n-1 but when I choose a Fraction in one record to validate with the New Meetings I want to create then it compulsory I must choose their option but I want to choose value of this record. May be I set up a worst relationships or others. Thank you